From: John Diehl on
So I would like to fit to a function which contains the quad() function.

Meaning, I use quad() to give me a numerical solution to an integral. This leaves me with a "function" which is traced out with a finite number of points (x and y data).

I would then like to fit a data set to this generated function:

fittype('some-stuff*quad(@(t)func(x(array),t),lower_limit,upper_limit)',...

does not work. The problem is that the quad() function returns an array of y-values to match the x(array) I put in. So it effectively traces out my function, but does not leave an x behind for the fittype function to use as an independent variable.

I am not sure if I have explained the problem well enough. Please let me know.

Thanks for any help you can offer!
-John