Borrar filtros
Borrar filtros

How to convert from a for loop to a while loop

2 visualizaciones (últimos 30 días)
abood sal
abood sal el 28 de Abr. de 2020
Editada: Eva-Maria Weiss el 30 de Abr. de 2020
i got stuck how to change this code from for loop to a while loop ,may someone help
  4 comentarios
Geoff Hayes
Geoff Hayes el 29 de Abr. de 2020
abood - which for loop do you want to convert to a while loop? All three?
abood sal
abood sal el 30 de Abr. de 2020
yes

Iniciar sesión para comentar.

Respuestas (1)

Eva-Maria Weiss
Eva-Maria Weiss el 30 de Abr. de 2020
Editada: Eva-Maria Weiss el 30 de Abr. de 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!!!

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by