I'm trying to stimulate BIG model in different situations (Beta-cells , insulin , glucose).
The following function is very simple. I'm able to change the parameter 's' at t>100.
function yprime = big(t,y)
yprime = zeros(3,1);
yprime(1) = m - s*y(2)*y(1);
yprime(2) = (q * y(3) * (y(1))^2) - delta * y(2);
yprime(3) = y(3)*0.01*(y(1)-5);
The second thing that I need to do is to change m=2 at t=90, t=110, t=200 (rest of the time m=1)
The problem is that the ODE is choosing the time points by itself and it skips these specific time point. How can I overcome this?
This is the code that i'm using to solve this.
[t,y] = ode45(@(t,y) big(t,y) , [0:1:400] ,[5,1/5,1/125]);