MATLAB: How to plot a second order non-linear ODE

odeplot

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));

Best Answer

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));