From: "Sanne Christensen" <sc_trold@hotmail.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webx
Newsgroups: comp.soft-sys.matlab
Subject: Re: Curve fitting a 3D data set
Message-ID: <eef3579.6@webx.raydaftYaTP>
Date: Wed, 24 Nov 2004 15:31:10 -0500
References: <eef3579.-1@webx.raydaftYaTP> <cnjb5n$guv$1@news-int2.gatech.edu> <eef3579.2@webx.raydaftYaTP> <cnl2d2$cd5$1@fb04373.mathematik.tu-darmstadt.de> <cnl63d$bbt$1@news-int2.gatech.edu>
Lines: 113
NNTP-Posting-Host: 83.88.75.69
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:244114



I still have some more pre-processing of my CT-scanned images to do
before I start on the curve fitting part, but thank you for all your
help :)

Teddy Hsung wrote:
>
>
> I guess his problem can be formulated like this:
>
> z1 = f(x1, y1, p1,p2...)
> z2 = f(x2, y2, p1,p2...)
> .
> .
> .
> zn = f(xn, yn, p1,p2...)
>
> where f is a known form of function. p1,p2... are the parameters
> that he
> wants to estimate.
>
> \ (slash) function probably won't work because his function is
> highly
> possible a nonlinear function.
>
> p=LSQCURVEFIT(f,p0,XYDATA,ZDATA) should be able to solve this
> problem.
>
> where, p is a vector [p1, p2..]', p0 is initial guess of p.
>
> XYDATA is a matrix [x1,y1
> x2,y2
> .....
> xn,yn]
>
> ZDATA is a vector [z1, z2...zn]'
>
> Please let us know how it works
>
> Rentian
>
>
> "Peter Spellucci"
<spellucci@fb04373.mathematik.tu-darmstadt.de>
> wrote in
> message news:cnl2d2$cd5$1@fb04373.mathematik.tu-darmstadt.de...
>>
>> 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
>>
>>
>>
>
>
>