simple matlab function (simulink) with if?
1 次查看(过去 30 天)
显示 更早的评论
I have written the very basic MAtlab function on matlab and would like why I am getting this error:
function [pos, neg] = select_output(err)
% if the error is negative , flow through the PID designed for negativ
% errors otehrwise positiv
if err >= 0
pos=err;
else
neg=err;
end
![matlabfunction.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247924/matlabfunction.png)
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!