F(N) versus N plot for logistic differential equation

Answers (1)

To solve for N you simply have to implement the ODE as a matlab-function, either as in an m-file or as an anonymous function-handle, then integrate it from some initial condition with some values of r and K over some period of interest. Something like this:
qwerty(t,N,r,K) = @(t,N) r*N*(1-N/K);
[t_out,N_out] = ode45(@(t,N) qwerty(t,N,r_yours,K_yours),[0 123],12);
How to plot f(N) vs N is not at all clear since you haven't specified f. But something like this:
plot(N,f(N),'.-')
HTH

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 26 Mar 2021

Answered:

on 26 Mar 2021

Community Treasure Hunt

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

Start Hunting!