[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Robust curve fitting




Mark Elliott <mark@mail.mmrrcc.upenn.edu> writes:
> 
> 	Do you or anyone reading this know if there are similar IDL (or
> MINPACK) routines which perform Levenberg-Marquardt fitting to COMPLEX
> functions?
> 

I'm not an expert in the field, I just translated the program!

I can tell you that MPFIT itself does not understand complex
variables; they have to be either FLOAT or DOUBLE.  I am not even sure
what the least-squares problem means when you talk about complex
numbers.  If you want to minimize the Euclidean distance between data
and model points on the complex plane, and if your data have
independent errors in the real and imaginary components, then the
solution should be easy.

You should be able to treat your data as a two-dimensional function.
In principle, MPFIT and its siblings can fit a function of any number
of dimensions.  So you could possibly just separate the real and
imaginary components out in both your data and function.  MPFIT will
minimize the sum of the squared differences between individual
components, which amounts to minimizing the Euclidean distance I
think.

Good luck,

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------