Solving several ODEs in ONE m-file
显示 更早的评论
Firstly, I made it to solve a ODE with following code.
function ndot = n_t(t,n)
ndot = A*(x*n+a)^2*exp(-B/(x*n+a)*(b-n))*(x+a)/(x+b);
end
[t1,y1]=ode15s(@n_t, [10^-12,1], 0);
A,B,a,b are constant and so is x(=4.5).
But, now, I want to solve not ONE ODE but 61 ODEs with
x = 1.5 : 0.1 : 7.5
Should I make 61 m-files to solve this problem? If not, please let me know. Thank you.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!