control hystérésis 4 level
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1440423/image.jpeg)
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 Kommentare
Dyuman Joshi
am 23 Jul. 2023
Bearbeitet: Dyuman Joshi
am 23 Jul. 2023
Are you working with a Simulink model?
Or are you just running the code you posted?
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!