Path: news.mathworks.com!newsfeed-00.mathworks.com!irazu.switch.ch!switch.ch!news.belwue.de!news.tu-darmstadt.de!spellucci
From: spellucci@fb04373.mathematik.tu-darmstadt.de (Peter Spellucci)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Curve fitting a 3D data set
Date: Fri, 19 Nov 2004 15:10:26 +0000 (UTC)
Organization: TU Darmstadt, Fachbereich Mathematik
Lines: 48
Sender: spellucci@mathematik.tu-darmstadt.de
Message-ID: <cnl2d2$cd5$1@fb04373.mathematik.tu-darmstadt.de>
References: <eef3579.-1@webx.raydaftYaTP> <cnjb5n$guv$1@news-int2.gatech.edu> <eef3579.2@webx.raydaftYaTP>
NNTP-Posting-Host: fb04373.mathematik.tu-darmstadt.de
X-Trace: lnx107.hrz.tu-darmstadt.de 1100877026 28744 130.83.2.113 (19 Nov 2004 15:10:26 GMT)
X-Complaints-To: news@news.tu-darmstadt.de
NNTP-Posting-Date: Fri, 19 Nov 2004 15:10:26 +0000 (UTC)
X-Newsreader: xrn 9.02
Xref: news.mathworks.com comp.soft-sys.matlab:243041




In article <eef3579.2@webx.raydaftYaTP>,
 Sanne <sc_trold@hotmail.com> writes:
 >That is exactly what I am trying to do. My data should fit to
 >something like a poly of second order (parabola) and I could only
 >find functions (polyfit) which could do it in 2D
 >
 >Teddy Hsung wrote:
 >>
 >>
 >> My understanding to you question is that you have a known form of
 >> function
 >> with some unknown parameters. And you have bunch of 3D data. You
 >> want to fit
 >> those data to get the parameters??
 >>
 >> If so, the optimization toolbox can help you out. If you can
 >> provide more
 >> details, I would be happy to give it a try.
 >>
 >> Rentian
 >>
 >> "Sanne Christensen" <sc_trold@hotmail.com> wrote in message
 >> news:eef3579.-1@webx.raydaftYaTP...
 >>> I'm pretty new in the Matlab-world. How do I make curve fitting
 >> on a
 >>> 3D data set (x, y, z)? Do I need a special toolbox for it?
 >>>
  >>> Thanx for your help :)
 >>> Sanne
 >>
 >>
 >>

as long as only a polynomial model is to used, \ alone will do the job for you
otherwise you will need lsqcurvefit from the optimization toolbox. 
but ... (x,y,z) -data: and "curvefitting"  you mean indeed a curve?
not a surface? and then: which model do you have for that curve?
parametric : (a+b*t+c*t^2 ; d+e*t+f*t^2; g+h*t+i*t^2)  with
t the curve parameter (how to get this?) or implicit:
(intersection of two surfaces) 
 a(i)+b(i)*x+c(i)*y+d(i)*x^2+e(i)*x*y+f(i)*y^2=0  i=1,2
 plus some normalization constraints?
hth
peter