Creating matrix outside for loop
Mostra commenti meno recenti
I need to create a matrix of variables and have the current code below. Is there anyway to do this without a for loop?
x = 0:.1:1;
y = 0:.1:1;
for i = 1:length(x)
for j = 1:length(y)
x2(i,j) = x(i);
y2(i,j) = y(j);
end
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!