How to solve and plot a step response for a differential

8 ビュー (過去 30 日間)
Tony
Tony 2018 年 2 月 12 日
回答済み: Vijay Periasamy 2021 年 6 月 4 日
I need to solve a second order differential and plot the step response using matlab. The equation: 5x"+20x'+65x=f(t), f(t)=5t and 0 lessthan or equal to t less than or equal to 1.5.

回答 (2 件)

Birdman
Birdman 2018 年 2 月 13 日
Try the following code. Note that I used dsolve, laplace and syms2tf functions.
syms x(t)
eq=5*diff(x,2)+20*diff(x)+65*x==5*t
DX=diff(x);
solx=dsolve(eq,[x(0)==0,DX(0)==0])
Gs=syms2tf(laplace(solx))
step(Gs)
set(gca,'XLim',[0 1.5])

Vijay Periasamy
Vijay Periasamy 2021 年 6 月 4 日

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by