Why do i face this error?

1 回表示 (過去 30 日間)
Arman Kam
Arman Kam 2012 年 7 月 29 日
I wrote a code to do something and this code contains bunch of if statements and other things. when i try to run the program i face this error
??? DeagPGA2475((ceil(2*aa)-(2*Mmin)),round(((R/10)+0.5))=Ny+DeagPGA2475((ceil(2*aa)-(2*Mmin)),round((R/10)+0.5));
|
Error: The expression to the left of the equals sign is not a valid target for an
assignment.
and my complete if statement is
if o==1
if (R-floor(R))<=10
DeagPGA475((ceil(2*aa)-(2*Mmin)),round((R/10)+0.5))=Ny+DeagPGA475((ceil(2*aa)-(2*Mmin)),round((R/10)+0.5));
elseif (R-floor(R))>10 & R<=200
DeagPGA475((ceil(2*aa)-(2*Mmin)),11)=Ny+DeagPGA475((ceil(2*aa)-(2*Mmin)),11);
else
DeagPGA475((ceil(2*aa)-(2*Mmin)),12)=Ny+DeagPGA475((ceil(2*aa)-(2*Mmin)),12);
end
elseif o==2
if (R-floor(R))<=10
DeagPGA975((ceil(2*aa)-(2*Mmin)),round((R/10)+0.5))=Ny+DeagPGA975((ceil(2*aa)-(2*Mmin)),round((R/10)+0.5));
elseif (R-floor(R))>10 & R<=200
DeagPGA975((ceil(2*aa)-(2*Mmin)),11)=Ny+DeagPGA975((ceil(2*aa)-(2*Mmin)),11);
else
DeagPGA975((ceil(2*aa)-(2*Mmin)),12)=Ny+DeagPGA475((ceil(2*aa)-(2*Mmin)),12);
end
elseif o==3
if (R-floor(R))<=10
DeagPGA2475((ceil(2*aa)-(2*Mmin)),round(((R/10)+0.5))=Ny+DeagPGA2475((ceil(2*aa)-(2*Mmin)),round((R/10)+0.5));
elseif (R-floor(R))>10 & R<=200
DeagPGA2475((ceil(2*aa)-(2*Mmin)),11)=Ny+DeagPGA2475((ceil(2*aa)-(2*Mmin)),11);
else
DeagPGA2475((ceil(2*aa)-(2*Mmin)),12)=Ny+DeagPGA2475((ceil(2*aa)-(2*Mmin)),12);
end
i am really in some kind of hurry to know what's the problem. please help me Thanks

採用された回答

Arman Kam
Arman Kam 2012 年 7 月 29 日
sorry i just find out what is my mistake

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by