comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » curve fitting problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
curve fitting problem [message #9394] Mon, 16 June 1997 00:00 Go to next message
Vibor Paravic is currently offline  Vibor Paravic
Messages: 7
Registered: June 1997
Junior Member
Hi everybody,

Welcome to another week of fun in the sun.

Even though the majority of people around here use IDL, I am a Pv-Wave
guy. Either way here here is my problem.

I have an interesting problem. I have two 1D arrays which contain the
Cartesian coordinate data for a hysterisis curve. This means that the
curve is not a function, ie I have multiple f(x) data for each x. I have
a lot of these that I need to combine to obtain an average curve.

I need to
1. smooth the data
2. obtain a curve fit
3. evaluate the curve fit at discrete x values
4. average all the curves to obtain a general curve

If anybody has ever adressed a similar problem, and found a slolution ,
please share it.

thank you

Vibor Paravic
Institute of Orthopedic Research and Education
vparavic@bcm.tmc.edu
Re: curve fitting problem [message #20581 is a reply to message #9394] Thu, 13 July 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Hi Carlo and Pauline--

I'll assume that one of you will forward responses to your friend.
Remember we're not just here to serve you. The request itself is a
bit too generic to make a detailed response.

Information on IDL standard library routines can be found in a number
of places on the web. These two come to mind:

http://hires.gsfc.nasa.gov/~beck/pkgs/idl_5.1/idl.htm
http://www.astro.washington.edu/deutsch/idl/htmlhelp/slibrar y07.html

For curve fitting, there are a number of options. The standard IDL
library includes:
LINFIT - linear model
POLY_FIT - polynomial model
POLY_FITW - polynomial model with weights
COMFIT - a bunch of canned models
CURVEFIT - generic least-squares fitting
LMFIT - generic least-squares fitting

I would not recommend LMFIT, it's slow and not well suited to the IDL
philosophy. If one of the specific models doesn't match what is
needed, then you will have to construct your own model and use
CURVEFIT.

I also make freely available a curve fitting package called MPFIT
which some people seem to like. Here again you will have to construct
your own model function, or at least know the functional expression.
There are a number of benefits to the MPFIT functions, perhaps the
most important being it seems more robust than CURVEFIT. This package
can be found here:

http://cow.physics.wisc.edu/~craigm/idl/idl.html

Good luck,
Craig



Carlo Emanuele Demontis <cdemontis@speaairportsystems.com> writes:
>
> Hi, I am posting this for Pauline.
> Please, help her.
> Thank you all in advance
>
> Carlo Emanuele DeMontis
>
>
> ------------------------------------------------------------ -------------
>
> If anyone has an old or unused IDL manual to send to Devendra in India,
> that would be most lovely. Alternatively, if anyone can provide the
> said routine below that would be equally lovely!
>
> Please email Devendra directly since I don't think Devendra has
> newsgroup access.
>
> Thanks for your help,
>
> Pauline
>
>
> Devendra Singh <dschahar@hotmail.com> wrote:
>>
>> Hi Pauline
>>
>> Once again ,I wish to contact you in connection with an idl routine
> for
> the
>> curve fitting for straight line,expontial,power,logerthmic and
> ploynomial
>> from 1 degree to 10 degree including the plot of data and fitting.
> Kindly
>> provide me the said routine. I would be obliged to you.
>>
>> with warm regards,
>>
>> devendra singh

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: write digits into an ascii-file
Next Topic: Re: optimization question: a faster way to PIXMAP?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:56:40 PDT 2025

Total time taken to generate the page: 3.12182 seconds