I use matlab function block in simulink and got tihs error. Here is my code and error messages
function [ua, ub] = fcn(u)if (u >= 0) ub=0;else ua=0;end
Output argument 'ua' is not assigned on some execution paths. Function 'MATLAB Function' (#24.10.12), line 1, column 11: "ua" Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Errors occurred during parsing of MATLAB function 'Qz1/MATLAB Function'
Component:MATLAB Function | Category:Coder error
Errors occurred during parsing of MATLAB function 'Qz1/MATLAB Function'
Component:Simulink | Category:Model error
Best Answer