fit through zero [message #52714] |
Mon, 26 February 2007 06:32  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Hi all
I like to use a fit function which I can tell please go to 0,0
How can I do that with e.g. poly_fit or did you know an equivalent routine?
cheers
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
Re: fit through zero [message #52769 is a reply to message #52714] |
Thu, 01 March 2007 01:38  |
Paolo Grigis
Messages: 171 Registered: December 2003
|
Senior Member |
|
|
Bringfried Stecklum wrote:
> Reimar Bauer wrote:
>> Hi all
>>
>> I like to use a fit function which I can tell please go to 0,0
>>
>> How can I do that with e.g. poly_fit or did you know an equivalent routine?
>>
>> cheers
>> Reimar
>>
>>
> Hello Reimar,
>
> since you asked about poly_fit I assume that you want to fit a
> polynomial. It would be easy if poly_fit offers a keyword to flag
> certain degrees of the polynomial which then would be omitted from the
> fit. Since this is not the case I suggest to use svdfit with a user
> defined function. A polynomial without the constant term, i.e.
> y=ax+bx^2+cx^3... might be O.K.
>
> Note that svdfit uses a polynomial as well if no user-defined function
> is specified. However, the polynomial degrees cannot be flagged either.
> Since sdvfit is just a wrapper for the hardcoded nr__svdfit this feature
> can only be added by the ITT folks.
>
> with kind regards,
Here it's probably a good idea to use mpfitfun. Once you
have your polynomial function defined, it is easy to keep
some of the polynomial coefficients fixed for the fit.
Ciao,
Paolo
>
> Bringfried
>
> ------------------------------------------------------------ --------------------
> Dr. Bringfried Stecklum
> Thueringer Landessternwarte Tautenburg
> Sternwarte 5
> D-07778 Tautenburg, Germany
> Phone: +49-36427-863-54
> FAX: +49-36427-863-29
> ------------------------------------------------------------ --------------------
|
|
|
Re: fit through zero [message #52771 is a reply to message #52714] |
Thu, 01 March 2007 01:03  |
Bringfried Stecklum
Messages: 75 Registered: January 1996
|
Member |
|
|
Reimar Bauer wrote:
> Hi all
>
> I like to use a fit function which I can tell please go to 0,0
>
> How can I do that with e.g. poly_fit or did you know an equivalent routine?
>
> cheers
> Reimar
>
>
Hello Reimar,
since you asked about poly_fit I assume that you want to fit a
polynomial. It would be easy if poly_fit offers a keyword to flag
certain degrees of the polynomial which then would be omitted from the
fit. Since this is not the case I suggest to use svdfit with a user
defined function. A polynomial without the constant term, i.e.
y=ax+bx^2+cx^3... might be O.K.
Note that svdfit uses a polynomial as well if no user-defined function
is specified. However, the polynomial degrees cannot be flagged either.
Since sdvfit is just a wrapper for the hardcoded nr__svdfit this feature
can only be added by the ITT folks.
with kind regards,
Bringfried
------------------------------------------------------------ --------------------
Dr. Bringfried Stecklum
Thueringer Landessternwarte Tautenburg
Sternwarte 5
D-07778 Tautenburg, Germany
Phone: +49-36427-863-54
FAX: +49-36427-863-29
------------------------------------------------------------ --------------------
|
|
|