running into issues when using Ode 45
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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
am 3 Jun. 2020
Can you post the differential equation you are trying to solve?
Antworten (1)
madhan ravi
am 3 Jun. 2020
0 Stimmen
https://www.mathworks.com/help/matlab/math/parameterizing-functions.html You are almost there ;)
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!