Eliminate zero and negative roots by Embedded Matlab Function
3 views (last 30 days)
I have used an embedded matlab function in simulink to Eliminate zero and negative roots in the input vector(u) so the output(y) will be vary in size according to that. The following is the code that I have written in this block:
function y = clipo(u) u(u <= 0) = ; coder.varsize('y',4); y=u;
But I get the error: Dimension 2 is fixed on the left-hand side but varies on the right ([1 x 4] ~= [1 x :?]).