Need to move to another line to avoid error

2 views (last 30 days)
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 Comment
John D'Errico
John D'Errico on 14 Feb 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.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!