iterating over an ode solver
5 views (last 30 days)
I am writing a program to solve an ode system multiple times with different parameter values. I added the two parameters decay and peak to the ode function Full_Model, and created a loop over the ode solver.
However, when I store the responses in a 3d matrix, STORE, I get the same results. In other words, X = Y = Z
I think I am missing some kind an index to allow the storage of the new response but could not find it
here is my script (don't worry about other parameters, they already have been defined)
Thanks in advance.
options = odeset('AbsTol', 10^-6, 'RelTol', 10^-6, 'MaxStep', 0.1);
STORE = zeros(30001,4,length(peak));
for i = 1:length(peak)
for j = 1:length(decay)
[sim_t,response] = ode15s(@Full_Model, t, init_cond, options,peak(i),decay(j));