Curve Fitting and Plotting

Michael Creel michael.creel at uab.es
Fri Sep 26 08:36:32 CDT 2008


There are _many_ options, depending on what kind of fit you would
like. You can get a nonparametric (kernel regression) fit to data
distributed randomly around a straight line using something like

x = (1:100)/100';
y = x + randn(100,1);
f = kernel_regression(x,y,x);
plot(x, [y f])

This requires the econometrics package in Octave Forge. For this data,
the ols fit (do help ols for more info) would be a better choice,
though. Just an example that a lot of options are available.

Michael

On Fri, Sep 26, 2008 at 12:32 PM, Kearan Mc Pherson
<kearan.mcpherson at gmail.com> wrote:
> Hi
>
> I am new to Octave and Gnuplot. I need help on fitting a curve through a
> data.dat file, that contains values x an y in column format.
> Any ideas where to start?
>
> Kind regadrs
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>


More information about the Help-octave mailing list