フィルターのクリア

"temp" was previously used as a variable, conflicting with its use here as the name of a function or command.

4 ビュー (過去 30 日間)
Don't know why shows "temp" was previously used as a variable, conflicting with its use here as the name of a function or command.
  3 件のコメント
Maria
Maria 2020 年 5 月 29 日
sorry put what before loop?
Image Analyst
Image Analyst 2020 年 5 月 29 日
The one that said for i = 1 : n. But it looks like John pointed out the same thing I did, and that turned out to be the problem. Sometimes error messages can be deceptive/misleading.

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

採用された回答

John D'Errico
John D'Errico 2020 年 5 月 29 日
編集済み: John D'Errico 2020 年 5 月 29 日
The MATLAB language does not include this syntax
temp += 26
Just because it works in some other language, does not make it valid syntax when in MATLAB. Just use
temp = temp + 26;
What does the error indicate? What are you being told?
temp is a variable, right? However, when MATLAB sees
temp += 26
it thinks you are trying to issue a command, or execute a function named temp. (All commands in MATLAB are also functions with the same name.) But it knows that temp is a variable, and temp cannot be used in both contexts at the same time. So it generates that error message.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by