I have some differential equations that I need to solve using MATLAB\'s ODE solvers. While the differential equations themselves are fairly simple, they depend on a lot of \"con
I would suggest creating specific "generator" functions for each system of ODEs you want to solve (based on Loren's suggestion to make use of anonymous functions). Here's what one might look like for your example:
function odeFcn = makeODE(j,k,l,m,n,o)
odeFcn = @(t,y) [-j*(k+y(1))/(l+y(1)); -m*(n+y(2))/(o+y(2))];
end
Each generator function would accept a set of input parameters and use them to create an anonymous function, returning the function handle as an output from the generator function. Here's how you can then use it:
outputVector = ode15s(makeODE(a,b,c,d,e,f), [0,endTime], [x,y]);