How do I assign multiple values to variable?
Ältere Kommentare anzeigen
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.
Antworten (1)
Steven Lord
am 9 Nov. 2015
0 Stimmen
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.
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!