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

1 次查看(过去 30 天)
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!!

采纳的回答

Srivardhan Gadila
Srivardhan Gadila 2020-7-17
Refer to end & if, elseif, else.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by