Parse error at END: usage might be invalid MATLAB syntax
Mostrar comentarios más antiguos

MATLAB App Designer doesn' even let me run this, saying 'Invalid use of operator'. Even before I run, I get this parse error at END. I've rechecked the code multiple times and am unable to figure out the problem. Pleass helpp!
8 comentarios
Walter Roberson
el 3 de Jun. de 2019
I suspect you have one too many end statements, but we would need to check the code.
Hemanth Hariharan
el 4 de Jun. de 2019
Mubarak
el 21 de Feb. de 2021
Walter Roberson
el 21 de Feb. de 2021
I recommend that you highlight all the code and click on the "smart indent", and then review the result to see whether the nesting agrees with your expectation. You probably have one too many end statements somewhere.
Mubarak
el 22 de Feb. de 2021

Mubarak
el 22 de Feb. de 2021
@Walter Roberson Thank you so much for the advice. I went through the code and it seems to have the correct number of end statement. The error is still there though. Thank you
Walter Roberson
el 22 de Feb. de 2021
Notice line 87 and 88 have their end at the same level. With the default auto-indent settings the only time that happens is if you are in a top level function and a nested function ends on line 87 and the top level ends at line 88.
But if you ended the top level function on line 88 then there is no level available to end at line 102.
I recommend that you use Preferences to change indent style from Classic to All Functions and then re-do the auto-indent
Mubarak
el 22 de Feb. de 2021
@Walter Roberson Thank you very much. It's sorted out :)
Respuestas (0)
Categorías
Más información sobre Shifting and Sorting Matrices en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!