How to make a function/script start over
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Walter Roberson
le 9 Mai 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 commentaires
Plus de réponses (1)
Daniel Shub
le 9 Mai 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 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!