How to handle symbolic object in If loop to avoid 'ge' is not implemented for MuPAD symbolic objects."error
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!