How do I use ode45 to solve this ODE?

I was given this equation:
where B is the bacteria growth, t is time, r is a constant parameter and k is the carrying capacity.
I'm supposed to use ode45() to calculate the bacteria growth from t = 0 to t = 100 with a time step of 0.01 for five cases of r (r = 0.05, 0.1, 0.5, 1, 10) and k = 15. The initial condition is B(0) = 1.
I've tried looking online for help but all their equations have t in it. I'm still a beginer in matlab and I don't know how to go about solving this.

Answers (1)

‘...all their equations have t in it.’
As does the one you posted.
Note that ‘B’ is implicitly a function of time, because the derivative of it is with respect to time, so it is actually ‘B(t)’.
That should get you started. Since this appears to be homework, we will only give you hints.
Post back here if you have problems getting your code to run, and include the code.

Products

Asked:

on 2 Jun 2020

Answered:

on 2 Jun 2020

Community Treasure Hunt

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

Start Hunting!