Solving several ODEs in ONE m-file
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!