create a statement conditional on if index is in bounds
이전 댓글 표시
lets say A is a matrix [4 2 3 1 5 0]. during a while loop with j=j+1 on each loop, I would like to say if A(j) is out of bounds then the program needs to break the while loop. If you have any questions let me know. Thanks for your help!
댓글 수: 1
Walter Roberson
2013년 1월 23일
편집: Walter Roberson
2013년 1월 23일
A(j) is out of bounds with respect to what? Some other matrix? Or are you asking about whether j is out of bounds with respect to indexing A ?
답변 (0개)
카테고리
도움말 센터 및 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!