Clear;
clc
% analysis solution
y 1 = dsolve(' Dy-0.02 *( 1-0.00 1 * y)* y = 0 ',' y(0)= 10 ');
Man (y1);
% numerical solution
f=@(x,y)0.02 *( 1-0.00 1 * y)* y;
,[ 10]);
plot(X,Y);
The analytical solution of the operation result is:
? 1000?
- ?
? / ? t? \?
exp| log(99) - -? | + 1?
? \ ? 50 /
The result of numerical solution may be slightly different from the exact analytical solution, which is caused by the limitation of function ode23.
The matrices x and y are the horizontal and vertical coordinate values of the function,
The function image is: