Nested loops- not entering the second loop?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
m=2;
n=16;
A = zeros(m*n,m*n);
b = zeros(m*n,1);
%interior points
for i=2:n-1
disp('first loop:');
disp(i);
for j=2:m-1
disp('second loop:');
disp('im here!!');
A(i*j,m-(i*j))= -4;
end
end
I'm trying to populate A with values at certain indeces. For some reason, I am not able to even enter the second loop. I can't understand what's going on here, can someone help me?
2 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!