for loop for matrix
1 回表示 (過去 30 日間)
古いコメントを表示
hi everyone,
i need help for my code.
I have one for loop and A matrix, each loop i obtain new matrix, and for each matrix i want to plot the values,
A=10 X 10 continusely renewable matrix, and i want to plot each matrix in same figure,
0 件のコメント
採用された回答
Walter Roberson
2021 年 5 月 10 日
編集済み: Walter Roberson
2021 年 5 月 10 日
A = randi([-9 9], 10, 10)
A = {A};
for K = 1 : 3
A{K+1} = A{K}*A{1};
figure(); surf(A{K+1}); title("iteration " + K)
end
3 件のコメント
Walter Roberson
2021 年 5 月 10 日
for cc = 1 : 3
U(:,26) = U(:,26) + randn(size(U,1),1); %or whatever change is appropriate
plot(xx, U(:,26))
title("iteration " + cc);
hold on
end
その他の回答 (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!