Cycle For how can i??
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello guys i have a matrix W(418*413) i need to do a "for cycle" that goes from 2:417 and that goes from 2:412 but instead of writing down the final number i want write "end-1" but when i write end it assumes that im ending the cycle of course, how can i write the right way so it can identify that it goes from 2 line till end-1.
P.e. for nx=2:412 but instead of writing 412 i want it "end-1"
for ny=2:417 the same here.
end end
댓글 수: 0
채택된 답변
Ilham Hardy
2015년 1월 15일
편집: Ilham Hardy
2015년 1월 16일
If i fully understand the question, below is the "cycle for loop" that you want,
for idrow = 2:size(W,1)-1
for idcol = 2:size(W,2)-1
do stuff
end
end
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 AI for Signals and Images에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!