Troubleshooting a 'for' loop code - help!
4 ビュー (過去 30 日間)
古いコメントを表示
This is my code -

The code is not running through the second for loop i.e. for 'l'. As a result elements of only the first row of all columns are getting updated. Output is:
encrypt =
44 140 108
0 0 0
0 0 0
What did I miss in the code?
0 件のコメント
採用された回答
Walter Roberson
2017 年 2 月 11 日
You have
encrypt(i,j)=temp
but your i is always 1, so you never write outside of the first row.
その他の回答 (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!