Ordinary Differential Equations (ODEs)
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kutlu Yigitturk
el 20 de Abr. de 2021
Comentada: Star Strider
el 20 de Abr. de 2021
syms t y(t)
ysol=dsolve(' D2y + Dy + 4.25*y = 0','y(0)=2','Dy(0)=1');
y(t)=simplify(ysol)
ezplot(y(t),[0 10]);
xlabel('t');
ylabel('y(t)');
Based on the code block above, I get the following output.
But the output I want to get is as follows.
The formula is as above
I have to use ezplot. How can I get the 2nd output? Where am I making a mistake?
0 comentarios
Respuesta aceptada
Star Strider
el 20 de Abr. de 2021
Change the ezplot call to fplot:
syms t y(t)
ysol=dsolve(' D2y + Dy + 4.25*y = 0','y(0)=2','Dy(0)=1');
y(t)=simplify(ysol)
fplot(y(t),[0 10]);
xlabel('t');
ylabel('y(t)');
grid
And note the Warning.
4 comentarios
Star Strider
el 20 de Abr. de 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Más respuestas (0)
Ver también
Categorías
Más información sobre Particle & Nuclear Physics 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!