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?
댓글 수: 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!