why am I getting parse error as soon as I start loop ?
Mostrar comentarios más antiguos
As soon as I type for, if etc. I get,
Parse error at <EOL>: usage might be invalid matlab syntax.
I get this error even if I do not write a single line of code.
3 comentarios
Dyuman Joshi
el 12 de Dic. de 2022
"I get this error even if I do not write a single line of code."
Did you try to run a script or function file?
Askic V
el 12 de Dic. de 2022
loops such as "for" of "if" statements should be ended with a keyword "end".
Ashish Phadke
el 12 de Dic. de 2022
Respuestas (1)
Walter Roberson
el 12 de Dic. de 2022
1 voto
the expression for the condition of if or while must start on the same line, not the next line.
Comparisons are == not =
1 comentario
Ashish Phadke
el 20 de Dic. de 2022
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!