I'm trying to solve an ODE in Matlab and I have the following problem: my code is as bellow:
xinit=[0.19;25;0;7];
t=0:768:76800; %% 101 cells
[t1,y]=ode45(@Model_Bio,t,xinit);
In the function @Model_Bio I have a parameter that I need to read its corresponding values for each time step (101 values)! So, My @Model_Bio is somehow as bellow:
load 'mydata'
a=mydata;
.....
the problem is that, when I execute the ode45(@Model_Bio,t,xinit), it calls my function with an automated time step (for example 50 times!) and my problem is that I cannot assign the values for each of my time step (101)! Also, I think its not a good idea to change the time step of the ode the same as my 101 steps! Anyone that help me on this is really appreciated!