mardi 24 mai 2016

MATLAB: How to put if statements on type of the error matlab brings up

I am using a joint script with my main matlab code. Under some conditions the joint script gives different types of errors which based on that I should change some parameters in my main code.

The error statements based on the condition that brings up the error are always the same for that condition, and the line of the error is also the same. And I know for each condition of error what should I change in my main code.

How can I put if statements that if the script stopped executing due to let's say error" ... ABC... (line 426)" my script change parameter "count" and re run the script.

Can the if statement be written based on the line that error occurs or the message statement, and how it can be written?

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire