Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
The code with for loop h=1:1 whose initVal:endVal are same, can it be run 100 or more times ?

Réponse acceptée

KSSV
KSSV le 1 Déc 2016
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 commentaires
KSSV
KSSV le 1 Déc 2016
for h = 1:1 it runs only once....if you want to check type h after line 23...it takes only h = 1.
HABILA
HABILA le 1 Déc 2016
ohh... okay..... need to study more. Thanks anyway...

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by