Heaviside function in simulink
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Marko Boskovic
el 8 de Feb. de 2021
Comentada: Marko Boskovic
el 8 de Feb. de 2021
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)));
0 comentarios
Respuesta aceptada
Walter Roberson
el 8 de Feb. de 2021
If you are in a MATLAB Function Block then
heaviside = @(x) x >= 0;
2 comentarios
Walter Roberson
el 8 de Feb. de 2021
function y = fcn(t)
y = zeros(size(t));
heaviside = @(x) x >= 0;
y = 20.*t.*heaviside(t) - 40.*(t-10).*heaviside(t-10) + 20.*(t-(680)).*heaviside((t-(680)));
end
Más respuestas (0)
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!