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!