Need to move to another line to avoid error

2 vues (au cours des 30 derniers jours)
Robert Demyanovich
Robert Demyanovich le 14 Fév 2022
Commenté : John D'Errico le 14 Fév 2022
My simulations is tedious and takes quite some time. To ease my burden, I have setup the simulation to run in batch mode. The simulation reads an input file that, for example, gives the input parameters for what would be 25 different runs. So the 25 different runs will be under the iteration labeled "Main Iteration". The problem I am having is that the simulation might abruptly end if it runs out of experimental data. There is a loop for "Experimental Iteration". I can test for this potential problem by reading the number of rows in the Matlab table that contains imported or "read in" experimental data from Excel. I would like to test for this condition and if the next "Experimenta Iteration" will cause the error I want the code to exit the "Experimental Iteration" and move to the next set of input parameters or the next "Main Iteration". Since Matlab does not provide a Goto, I don't know how to make this work.
  1 commentaire
John D'Errico
John D'Errico le 14 Fév 2022
Does MATLAB have an if-else clause? Does it have a while loop? Does it have a break statement, to allow you to break out of a loop? Oh well. No goto. No need.

Connectez-vous pour commenter.

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by