I would like to use an Interpolating Function as a fitting function in the NonlinearFit package, since the actual function is an integral I can't do analytically and this ought to speed things up. However, I can't make this work the way I expected it to - the fitting procedure, using the interpolated function just as I would the original function, seems to enter a loop of some sort and eat up all my computer's memory. I have a vague feeling that this is related to some sorts of attributes the interpolating function may have, based on the way Mathematica seems to handle ReplaceAll commands (see plotting examples) but I can find no way to change these. I would be thrilled if anyone has some suggestions.
Attachment: troubleshoot.nb, URL: ,