How to handle symbolic object in If loop to avoid 'ge' is not implemented for MuPAD symbolic objects."error
조회 수: 1 (최근 30일)
이전 댓글 표시
syms x4 x6 x8
Lm=1;
Ls=2;
Pref=1.0;
Isd=-(x6/Ls)+((Lm/Ls)*x8);
Pmeas=x4*Isd
% if (Pmeas>=Pref)
Kp=300;
% else
% Kp=0;
% end
Beta=Kp*(Pmeas-Pref);
x4=1;
x6=1;
x8=1;
op=eval(Beta)
....do something
But i am getting the error "Function 'ge' is not implemented for MuPAD symbolic objects." since x4 x6 x8 are symbolic Pmeas is also symbolic object.How to use symbolic object in if loop.Beacuse depending upon the comparison only Kp has to be fixed.
If i use if loop to compare Pmeas with Pref (Numeric comparison)it isshowing error, ge which is greater than (ge)Please help.
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!