Nested loops- not entering the second loop?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!