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

1 view (last 30 days)
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!!

Accepted Answer

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

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!