How do I assign multiple values to variable?
Afficher commentaires plus anciens
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.
Réponses (1)
Steven Lord
le 9 Nov 2015
0 votes
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.
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!