Hi. I'm trying to fit a function which is a function of a time shifted integral function, so the limits of the integral are themselves parameters.
The function to fit, C(t), is a parameter, A, times the integral of B(u), from a second parameter, deltaT, to the second parameter + t. u is the sum of the parameter deltaT and t.
symbolically:
C(t)=A * int(B(u),deltaT,deltaT+t)
where u=deltaT+t
I do have data for both B(t) and C(t), and don't know beyond a guess what functional form B would take. The plan is to spline interpolate B(t) to generate B(u). Leaving everything at integer t values is fine if necessary, especially B, though I'd prefer the finished fit of C to be at a finer timescale.
I'm having a tough time coming up with the right way to do the integration in matlab.
The closest I have come is using cumtrapz for B(t) from 0 to t, but then things won't work right when I need a floating deltaT.
Quad and quadv don't seem to work work as B(t) and B(u) aren't really functions proper.
Any pointer on how to approach this are appreciated.
