How can I plot a second order non-linear ODE?

This is my code so far but it does not work:
syms y(t)
ode = .003*diff(y,t)== .003*9.8-3.048*10^-6*y-
9.0726*10^-5*y^2;
cond = y(0) == 0;
ySol(t) = dsolve(ode,cond)
ezplot(y(t));

 채택된 답변

Star Strider
Star Strider 2018년 9월 19일

0 개 추천

I would think plotting ‘ySol(t)’ would be more interesting:
syms y(t)
ode = .003*diff(y,t)== .003*9.8-3.048*10^-6*y-9.0726*10^-5*y^2;
cond = y(0) == 0;
ySol(t) = dsolve(ode,cond)
ezplot(ySol(t));

댓글 수: 2

Thanks! Would you happen to know how to scale the y and x axis?
As always, my pleasure!
Probably. What do you want to do with them?

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

태그

질문:

2018년 9월 19일

댓글:

2018년 9월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by