Re: 2D-fit [message #38277] |
Tue, 02 March 2004 09:36  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Esa Riihonen <esa@riihonen.st.net> writes:
> Hi all!
>
> I seek advice on fitting a following function with 2-free variables mu and
> phi (Below '.' indicates multiplication and '^2' power of 2 ):
>
> F(mu,phi) = a0 + a1.mu + a2.mu^2 + (a3.mu + a4.mu^2).cos(phi-phi0),
>
> phi0 is a constant and ai are the fitting parameters.
>
> Measurement set consists of 240 values (10 values for mu and 24 for phi,
> this in effect a polar coordinate grid with 24 'sectors' and 10 'rings').
Greetings, in addition to Paul's reply, I would like to mention that
my FAQ contains discussion of fitting functions of more than one
variable. And, if you have an even spaced 2D grid, then you can
likely use MPFIT2DFUN.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
|
|
Re: 2D-fit [message #38354 is a reply to message #38277] |
Wed, 03 March 2004 00:53  |
Esa Riihonen
Messages: 6 Registered: July 2003
|
Junior Member |
|
|
On Tue, 02 Mar 2004 11:36:18 -0600, Craig Markwardt wrote:
[snip]
> Greetings, in addition to Paul's reply, I would like to mention that my
> FAQ contains discussion of fitting functions of more than one variable.
> And, if you have an even spaced 2D grid, then you can likely use
> MPFIT2DFUN.
>
> Craig
Hi!
Thanks for the FAQ tip. And yes, MPFIT2DFUN, looks just right for the job.
Furthermore, I used IDL's own CURVEFIT for an earlier (1-d) fit. I guess I
could use it in principle also here, but was seeking for a more intuitive
(for me) approach. However I was puzzled with the error estimates I got
for the parameters (they just don't make sense). If I understood what I
have read from the documentations thus far, MPFIT seems to addresses this
problem also.
Cheers,
Esa
--
Esa Riihonen - esa@riihonen.st.net (Remove spam trap = '.st')
The CT Creed: "There is no Game but Traveller,
and High Guard is its Product" Steve Hudson
|
|
|