running into issues when using Ode 45

Im having issue running this code to find the tt and y values
'Time step'
t = (0:0.01:100);
'loop through these cases of r'
r = [0.05 0.1 0.5 1 10];
'Equation variable'
k = 15
'inital guess'
B(0) = 1
'Equation'
dBdt = @(r,k) (r * B)*(1-(B/k));
'for loop to loop through the cases in r'
for i = 1: length(r)
[tt,y] = ode45(dBdt(i),t,1)
end

1 Kommentar

James Tursa
James Tursa am 3 Jun. 2020
Can you post the differential equation you are trying to solve?

Diese Frage ist geschlossen.

Gefragt:

am 3 Jun. 2020

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by