How can I simulate time response of dynamic system to arbitrary inputs without shown the arbitary input on my plot?
1 次查看(过去 30 天)
显示 更早的评论
How can I simulate time response of dynamic system to arbitrary inputs without shown the arbitary input on my plot?
H = [tf([2 5 1],[1 2 3])];
[u,t] = gensig('square',4,10,0.1);
lsim(H,u,t)
0 个评论
采纳的回答
Sebastian Castro
2016-4-12
If you assign outputs to lsim, you don't get the specialized plot and simply get the output variables. So, if you add an extra line to your code as follows, you're good to go:
H = [tf([2 5 1],[1 2 3])];
[u,t] = gensig('square',4,10,0.1);
[yout,tout]= lsim(H,u,t);
plot(tout,yout)
- Sebastian
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dynamic System Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!