why am I getting parse error as soon as I start loop ?
古いコメントを表示
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 件のコメント
Dyuman Joshi
2022 年 12 月 12 日
"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
2022 年 12 月 12 日
loops such as "for" of "if" statements should be ended with a keyword "end".
Ashish Phadke
2022 年 12 月 12 日
回答 (1 件)
Walter Roberson
2022 年 12 月 12 日
1 投票
the expression for the condition of if or while must start on the same line, not the next line.
Comparisons are == not =
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!