How can I integral this equation and plot? please help me
조회 수: 1 (최근 30일)
이전 댓글 표시
dy/dt = y*t^2 + 3*y
y(0) = 1
t= 0:2
This is the equation which I want to integral
But when I integrate and plot this how can I get dy/dt. Because dy/dt becomes y when i intergrate it.
댓글 수: 2
John D'Errico
2021년 6월 16일
You want to plot the derivative?
Surely it would be true, that if you know y(t), and t, then you can compute dy/dt, since you have the expression right there.
답변 (1개)
Walter Roberson
2021년 6월 16일
syms y(t) c
eqn = diff(y) == y*t^2 + 3*y
ic = y(0) == 1
sol = dsolve([eqn, ic])
fplot(sol, [0 2])
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!