How do I assign multiple values to variable?
显示 更早的评论
I have to use ODE45 to solve the following equation

IC's y(0)=0, dy(0)/dx = 3 b = 0.1,1,10,100,1000
I think I have a handle on how to do use the ODE45 function but I am having problem with the values of b. How do I set b equal to the list of values? Thanks.
回答(1 个)
Steven Lord
2015-11-9
0 个投票
See the ODE45 documentation; the Description section includes a link describing how to parameterize the function you pass into ODE45. You will not be able to solve your system for all of your values at once, but you can solve the system with multiple calls to ODE45 (in a loop, for example), one call per value of b.
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!