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 个评论
James Tursa
2020-6-3
Can you post the differential equation you are trying to solve?
回答(1 个)
madhan ravi
2020-6-3
0 个投票
https://www.mathworks.com/help/matlab/math/parameterizing-functions.html You are almost there ;)
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!