Troubleshooting a 'for' loop code - help!

1 次查看(过去 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?

采纳的回答

Walter Roberson
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 CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by