Why do i face this error?

1 vue (au cours des 30 derniers jours)
Arman Kam
Arman Kam le 29 Juil 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

Réponse acceptée

Arman Kam
Arman Kam le 29 Juil 2012
sorry i just find out what is my mistake

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by