the loop, for h=1:1 is running like 200 times. can anyone help me to understand with this ?

2 次查看(过去 30 天)
The code with for loop h=1:1 whose initVal:endVal are same, can it be run 100 or more times ?

采纳的回答

KSSV
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 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by