the loop, for h=1:1 is running like 200 times. can anyone help me to understand with this ?
조회 수: 3 (최근 30일)
이전 댓글 표시
채택된 답변
KSSV
2016년 12월 1일
To run for loop 100 times you have to use
for i = 1:100
%%do what you want
end
If initval and endval are same your code runs only once.
You can also use while loop, like below:
count = 0 ;
while count~=100
count = count+1 ;
end
댓글 수: 5
KSSV
2016년 12월 1일
for h = 1:1 it runs only once....if you want to check type h after line 23...it takes only h = 1.
추가 답변 (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!