Nested loops- not entering the second loop?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!