MATLAB: Heaviside function in simulink

MATLABsimulinksimulink function

How to generate this function in Simulink (Matlab code):
20.*t.*heaviside(t) - 40.*(t-10).*heaviside(t-10) + 20.*(t-(680)).*heaviside((t-(680)));

Best Answer

If you are in a MATLAB Function Block then
heaviside = @(x) x >= 0;
Related Question