Re: Multidimensional curve fitting [message #4337 is a reply to message #4256] |
Fri, 19 May 1995 00:00   |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <1995May19.085532.18482@rahman.earth.ox.ac.uk>, keith@earth.ox.ac.uk (Keith Refson) writes:
> I have a 2-dimensional dataset which I wish to parameterize with a
> scalar function of 2 variables in the form y=f(x1,x2) (and in the
> future I will extend this to higher dimensionalities). I would prefer
> a nonlinear function f(), but could make do with a polynomial of
> smallish order (<5).
>
> The usual IDL fitting routines svdfit and curvefit only deal with 1-d
> functions. There is a function "sfit" which claims to perform surface
> fitting, but this can not provide uncertainties in the fit, nor even
> take account of the numerical values of x1, x2.
I don't think it is true that CURVEFIT can only deal with 1-d functions.
CURVEFIT optimizes parameters to minimize the sum of the squares of the
differences between an observed data set and a predicted data set. The
independent variable, dependent variable and predictions are must be passed
as 1-D vectors, but there is no restriction on the number of dimensions the data
really represent. CURVEFIT has no trouble fitting a 2-D data set
if you REBIN the arrays to 1-D before passing them.
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
|
|
|