
% Parameters
k=4;N=2;

% Right-hand of Logistic Model
F=@(t,P)k*(1-P/N)*P;

% Initial Condition
P0=3;

% Numerical Solution over the time interval [0,4]
[t,P]=ode45(F,[0 4],P0);

% Plot the graph
plot(t,P)