How to skip error and continue to execute the code
Ältere Kommentare anzeigen
I have a for loop, but when I faced the following error, my script will stop executing. How can I do to skip the error and continue to execute the code?
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
Error in ReadinData (line 160)
NonData=[Weight;Height;Age];
I have loop like this
for i = 1:100
How can I record i when the error happen, so I can check after the problem execution.
2 Kommentare
Geoff Hayes
am 9 Mär. 2016
Jason - wouldn't it be better to fix the error before continuing? The error message is telling you that the dimensions of your three variables are not compatible when trying to use the vertical concatenation. When this error occurs, what are the dimensions of Weight, Height, and Age?
Jason
am 9 Mär. 2016
Akzeptierte Antwort
Weitere Antworten (1)
Stalin Samuel
am 9 Mär. 2016
2 Stimmen
1 Kommentar
Jason
am 9 Mär. 2016
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!