i was trying to run this function below and the Error message i am getting is Error: Function definitions are not permitted in this context. function y=emfg(u) |Can anyone help me out
Ältere Kommentare anzeigen
function y=emfg(u)
if (u>-180)&&(u<=-120)
y=[-1;0;1];
elseif(u>-120)&&(u<=-60)
y=[0;-1;1];
elseif(u>-60)&&(u<=0)
y=[1;-1;0];
elseif(u>0)&&(u<=60)
y=[1;0;-1];
elseif(u>60)&&(u<=120)
y=[0;1;-1];
elseif(u>120)&&(u<=180)
y=[-1;1;0];
end
Antworten (1)
Azzi Abdelmalek
am 24 Jun. 2015
Bearbeitet: Azzi Abdelmalek
am 24 Jun. 2015
u=10 % for example
y=emfg(u)
Kategorien
Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!