How to subtract two sequential iteration value in for loop
6 ビュー (過去 30 日間)
古いコメントを表示
Dear Expert,
If for loop (i=1:2) is generating two vlaues for A. Then how do i subtract the first value from second value?
Thank you
0 件のコメント
回答 (1 件)
Torsten
2022 年 10 月 8 日
移動済み: Image Analyst
2022 年 10 月 8 日
You mean
Aold = 0.0;
for i=1:5
Anew = i^2;
diff_A = Anew - Aold
Aold = Anew;
end
?
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!