Matlab Error, variable, to the left of equals sign

2 ビュー (過去 30 日間)
scott
scott 2012 年 12 月 12 日
I am assigning a variable in a for loop within a elseif statement and its I have
??? Error: File: Finally.m Line: 223 Column: 9
The expression to the left of the equals sign is not a valid
target for an assignment.
when I am just assigning a variable to a number....
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 12 月 12 日
Post the part of code which causes error

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

回答 (1 件)

Dr. Seis
Dr. Seis 2012 年 12 月 12 日
You said you are "just assigning a variable to a number." You mean like this:
>> a = 2
a =
2
>> 3 = a
??? 3 = a
|
Error: The expression to the left of the equals sign is not a valid target for an assignment.
This is not allowed.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by