Find the variation of x(t)

조회 수: 4 (최근 30일)
Abhinav Raghunandan
Abhinav Raghunandan 2022년 5월 17일
댓글: Abhinav Raghunandan 2022년 5월 17일
Given differential equation
x''(t) + 7x'(t) + 5x(t) = 8u(t) where u is the unit step signal.
Initial Conditions: x(0) = 1, x'(0) = 2
Can someone please help me out to plot x(t) using Matlab with the given initial conditions?

채택된 답변

Chunru
Chunru 2022년 5월 17일
편집: Chunru 2022년 5월 17일
syms x(t)
Dx = diff(x, t);
eqn = diff(Dx, t) + 7* Dx + 5*x == 8
eqn(t) = 
cond = [x(0)==1, Dx(0)==2];
y = dsolve(eqn, cond)
y = 
fplot(y, [0 5])
  댓글 수: 3
Chunru
Chunru 2022년 5월 17일
since u(t)=1 for t>0 and the initial condition is at t=0, it take cares of u(t).
[0, 5] indicates the plotting interval for t is from 0 to 5 as shown in the plot.
Abhinav Raghunandan
Abhinav Raghunandan 2022년 5월 17일
thank you so much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by