How to make a function/script start over
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
How can I make a script/function start over (as if nothing had happened) if certain criteria are not met ?
Thank you, have a nice day !
0 comentarios
Respuesta aceptada
Walter Roberson
el 9 de Mayo de 2012
You cannot do that in MATLAB. You can, however, code a "while" loop that your code breaks out of if it is satisfied that everything is okay.
3 comentarios
Más respuestas (1)
Daniel Shub
el 9 de Mayo de 2012
Assuming you have a logical vector x of whether or not your criteria were meet
if ~all(x)
!matlab -r myscript.m &
exit
end
0 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!