"D R G" <firstname.lastname@example.org> wrote in message news:email@example.com... > I have a model of a process that is discrete - I also have some > experimental data, and I want to work out how well this fits the discrete > function; of course, some of these experimental points are 'between' my > discrete points, so I need to be able to estimate these to get a goodness > of fit: using interpolant fitting in the GUI curve fitting tool yields a > perfect fit,
Of course it does. That's the main difference between interpolation and curve fitting.
> whether linear, cubic of shape preserving is used: is thee some way I can > generate all my interpolant points to compare them with the data points? > I've attached an image of 30 of my discrete data points, and the > interpolant function that easily joins them. > > http://i.imgur.com/kz5XgzI.png - Screencap of discrete function / interp. > fit
Export the interpolant from the Curve Fitting GUI or generate code from the interpolant, then evaluate the exported interpolant or execute the generated code.
> My second question is can I then find a command line version? I will need > to automate this for a few hundred runs to find the best fit, and would be > ideal if I could code it into a .m file to basically generate a > interpolant fit, and compare this to lab data to get a goodness of fit.
See above or use the FIT function provided by Curve Fitting Toolbox: