Find the variation of x(t)

1 view (last 30 days)
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?

Accepted Answer

Chunru
Chunru on 17 May 2022
Edited: Chunru on 17 May 2022
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 Comments
Abhinav Raghunandan
Abhinav Raghunandan on 17 May 2022
thank you so much!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!