Why do i face this error?

1 Ansicht (letzte 30 Tage)
Arman Kam
Arman Kam am 29 Jul. 2012
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

Akzeptierte Antwort

Arman Kam
Arman Kam am 29 Jul. 2012
sorry i just find out what is my mistake

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by