Find the variation of x(t)

3 visualizaciones (últimos 30 días)
Abhinav Raghunandan
Abhinav Raghunandan el 17 de Mayo de 2022
Comentada: Abhinav Raghunandan el 17 de Mayo de 2022
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?

Respuesta aceptada

Chunru
Chunru el 17 de Mayo de 2022
Editada: Chunru el 17 de Mayo de 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 comentarios
Chunru
Chunru el 17 de Mayo de 2022
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 el 17 de Mayo de 2022
thank you so much!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by