running into issues when using Ode 45
Info
This question is closed. Reopen it to edit or answer.
Show older comments
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 Comment
James Tursa
on 3 Jun 2020
Can you post the differential equation you are trying to solve?
Answers (1)
madhan ravi
on 3 Jun 2020
0 votes
https://www.mathworks.com/help/matlab/math/parameterizing-functions.html You are almost there ;)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!