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!