Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to tell MATLAB to go to the next replication i

1 visualización (últimos 30 días)
Mikie
Mikie el 10 de Mzo. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi, I am new for MATLAB. Please, help me.
for i = 1:100
....
while .....
if WHATEVER
end
end
end
If WHATEVER is not true, how can I tell MATLAB to skip to the next replication i ? Please help me. Thank you so much.

Respuestas (1)

David Fletcher
David Fletcher el 10 de Mzo. de 2018
if WHATEVER=false
break;
end
  4 comentarios
Mikie
Mikie el 11 de Mzo. de 2018
Thank you so much. Also, how can I tell MATLAB not to keep "Empty sym: 0-by-1" to p? Skip it and collect only scalar p.
Walter Roberson
Walter Roberson el 11 de Mzo. de 2018
counter = 0;
all_p = sym([]);
for i = 1 : 100
...
if isempty(p); continue; end
counter = counter + 1;
all_p(counter) = p;
end

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by