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

Home » Public Forums » archive » curvefit question
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
curvefit question [message #25763] Wed, 11 July 2001 15:25 Go to next message
Mike Barker is currently offline  Mike Barker
Messages: 2
Registered: June 2001
Junior Member
Hello,

I would like to fit the following function:

y = m2*(x - x0) + m1*x0 + b1

where m2 is the ONLY parameter to be fitted and m1, b1, x0 are
variables (I DO NOT want to fit them). I'm having trouble figuring out
how to do this with curvefit (or any of the other built-in
routines). Curvefit won't let me pass m1, b1, and x0 as parameters. I
tried using a common block to store the variables but I still have to
compile the function before I declare the common block. If anyone could
help I would be forever grateful.

Sincerely,
Mike
Re: CURVEFIT question [message #45305 is a reply to message #25763] Wed, 31 August 2005 04:19 Go to previous messageGo to next message
elias is currently offline  elias
Messages: 13
Registered: April 2005
Junior Member
OK, problem solved. Somebody had put his modified version of CURVEFIT
in the primary folder, without changing the name of the routine...
Re: CurveFit question [message #45775 is a reply to message #25763] Tue, 04 October 2005 19:29 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"ChiChiRuiz@gmail.com" <ChiChiRuiz@gmail.com> writes:
> I'm using Curvefit function to fit a set of data points to a Gaussian
> curve. One of the arguments of CURVEFIT is "weights". I'm not really
> clear as to what it is, and what the value should be in my case. Any
> advise?

It depends on what kind of statistics you have. Here are common
values of weights:

; 1D/ERR^2 - Normal weighting (ERR is the measurement error)
; 1D/Y - Poisson weighting (counting statistics)
; 1D - Unweighted

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.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: CurveFit question
Next Topic: HDF5 - Group or Dataset?

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

Current Time: Wed Oct 08 20:05:11 PDT 2025

Total time taken to generate the page: 0.00998 seconds