How to convert from a for loop to a while loop
Afficher commentaires plus anciens
i got stuck how to change this code from for loop to a while loop ,may someone help

4 commentaires
James Tursa
le 28 Avr 2020
Please don't post code as pictures ... we can't copy & run pictures. Post code as text and format it with the CODE button.
abood sal
le 28 Avr 2020
Modifié(e) : per isakson
le 28 Avr 2020
Geoff Hayes
le 29 Avr 2020
abood - which for loop do you want to convert to a while loop? All three?
abood sal
le 30 Avr 2020
Réponses (1)
Eva-Maria Weiss
le 30 Avr 2020
Modifié(e) : Eva-Maria Weiss
le 30 Avr 2020
j = 1
while j <= 59
COPOALL(j,1) = COPOALL(j,1) + AllstudentsResult(j+3,i);
j = j + 1;
end
Maybe something like that? The same for the other for loops....
But why to replace? :)
Good luck!!!
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!