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!