control hystérésis 4 level
显示 更早的评论

function dP=active(x)
err=x(1);hys=x(2);
if err>=hys
dP=2;
elseif (0<err && err<hys)
dP=1;
elseif (-hys<err && err<0)
dP=-1;
elseif err<-hys
dP=-2;
end;
end
i got problem:Not enough input arguments line (2).
4 个评论
Dyuman Joshi
2023-7-23
How are you calling the function? What is the input provided?
laiche zeghdi
2023-7-23
Dyuman Joshi
2023-7-23
编辑:Dyuman Joshi
2023-7-23
Are you working with a Simulink model?
Or are you just running the code you posted?
laiche zeghdi
2023-7-23
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!