recommendations for curve fitting [message #54946] |
Tue, 24 July 2007 10:55  |
Josh
Messages: 21 Registered: June 2007
|
Junior Member |
|
|
i'm looking to add a trend- / fit-line to my plotted data, and not
finding any really nice and easy way to do so. the plot is currently
being generated with the PLOT command, and I'm not looking for
anything much more complicated than a quadratic fit (probably even
just linear). i tried using IPLOT and adding a curve fit there, but
it didn't work very well and was kind of awkward.
does anyone have any good recommendations for fitting a trendline to a
scatter plot? as i said, it will probably be as simple as linear /
quadratic in nature.
thanks.
|
|
|
Re: recommendations for curve fitting [message #55027 is a reply to message #54946] |
Wed, 25 July 2007 14:26  |
Josh
Messages: 21 Registered: June 2007
|
Junior Member |
|
|
On Jul 24, 11:55 am, Josh <joshuamonta...@gmail.com> wrote:
> i'm looking to add a trend- / fit-line to my plotted data, and not
> finding any really nice and easy way to do so. the plot is currently
> being generated with the PLOT command, and I'm not looking for
> anything much more complicated than a quadratic fit (probably even
> just linear). i tried using IPLOT and adding a curve fit there, but
> it didn't work very well and was kind of awkward.
>
> does anyone have any good recommendations for fitting a trendline to a
> scatter plot? as i said, it will probably be as simple as linear /
> quadratic in nature.
>
> thanks.
thanks for the suggestions, all. i actually thought I had deleted
this post, because i found sufficient fitting routines in idl. that's
what I get for not RTFM.
-josh
|
|
|
Re: recommendations for curve fitting [message #55029 is a reply to message #54946] |
Wed, 25 July 2007 12:19  |
willettk
Messages: 20 Registered: October 2006
|
Junior Member |
|
|
On Jul 24, 11:55 am, Josh <joshuamonta...@gmail.com> wrote:
> i'm looking to add a trend- / fit-line to my plotted data, and not
> finding any really nice and easy way to do so. the plot is currently
> being generated with the PLOT command, and I'm not looking for
> anything much more complicated than a quadratic fit (probably even
> just linear). i tried using IPLOT and adding a curve fit there, but
> it didn't work very well and was kind of awkward.
>
> does anyone have any good recommendations for fitting a trendline to a
> scatter plot? as i said, it will probably be as simple as linear /
> quadratic in nature.
>
> thanks.
Craig Markwardt's MPFIT routine does an outstanding job of fitting
whatever function you like to the data. Look here for a good tutorial
and examples.
http://cow.physics.wisc.edu/~craigm/idl/fitting.html
|
|
|