Why do i face this error?

1 visualización (últimos 30 días)
Arman Kam
Arman Kam el 29 de Jul. de 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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by