how to plot function with a sine input in Matlab (not in simulink)
显示 更早的评论
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.
采纳的回答
更多回答(1 个)
Geraint Bevan
2019-7-16
3 个投票
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')
类别
在 帮助中心 和 File Exchange 中查找有关 Classical Control Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!