how to plot function with a sine input in Matlab (not in simulink)
Mostrar comentarios más antiguos
we just type command 'step(function)' to plot a function with input step but How to plot a function that use sine as an input in Matlab.
Respuesta aceptada
Más respuestas (1)
Geraint Bevan
el 16 de Jul. de 2019
3 votos
Use the lsim function to apply an arbitrary input to a system.
G = tf(1,[1,1])
t = [0:0.01:10]
u = sin(t)
[y,t] = lsim(G,u,t)
plot(t,u,t,y)
legend('Input','Output')
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!