Thanks rsc42,
I have actually figured out what I was looking for. I used Y(3) = Y(ceil(t),1) - Y(ceil(t-30),1)+Y(ceil(t),2)-Y(ceil(t-30),2)). This is because my steps are in increments of 1, and I wanted to subtract past values of y1 and y2.
I am using ode45, but have a value that is based upon its own past values. I want to be able to include a parameter that equals (y(3) at time t) - (y(3) at time (t- 30days)). Is there a way to include this using ode45?
Thank you in advance!