running into issues when using Ode 45
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
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 commentaire
James Tursa
le 3 Juin 2020
Can you post the differential equation you are trying to solve?
Réponses (1)
madhan ravi
le 3 Juin 2020
0 votes
https://www.mathworks.com/help/matlab/math/parameterizing-functions.html You are almost there ;)
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!