How to loop the If statement for the following Maple code in MATLAB?

1 Ansicht (letzte 30 Tage)
Hello,
I am trying to convert Maple code to MATLAB and the old Maple coding closes if statement with fi: in Maple. How to close the below statements in MATLAB?
if(evalf(subs('x=XCEN,y=YCEN,z=ZCEN',f1ineq))<TOL) then
elements(EL_NUM)=1 fi;
if(evalf(subs('x=XCEN,y=YCEN,z=ZCEN',f2ineq))<TOL) then
elements(EL_NUM)=2 fi;
if(evalf(subs('x=XCEN,y=YCEN,z=ZCEN',f3ineq))<TOL) then
elements(EL_NUM)=3 fi;
if(evalf(subs('x=XCEN,y=YCEN,z=ZCEN',f4ineq))<TOL) then
elements(EL_NUM)=4 fi;
od: od: od;
Thank You!!

Akzeptierte Antwort

Srivardhan Gadila
Srivardhan Gadila am 17 Jul. 2020
Refer to end & if, elseif, else.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by