matlab syntax error "for" cannot run as it appears

回答 (1 件)

Cris LaPierre
Cris LaPierre 2020 年 10 月 21 日
編集済み: Cris LaPierre 2020 年 10 月 21 日

0 投票

The issue here is you have named your script 'for.m' but for is a reserved word indicating the start of a for loop.
Give your script a different name, type 'clear for' in the Command Window, and then try again.
Typically, you would include the N=12; in your script, and just press the green Run button to run the whole script.

1 件のコメント

Cris LaPierre
Cris LaPierre 2020 年 10 月 21 日
It looks like you are new to MATLAB. Consider going through MATLAB Onramp, which provides a brief introduction to the MATLAB environment and fundamentals.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSoftware Development についてさらに検索

製品

質問済み:

2020 年 10 月 21 日

コメント済み:

2020 年 10 月 21 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by