From: Alex on
I have a bunch of data points (x,y,z) and I know that these points go asymptotically like z = ax + by for some a,b. Is there some sort of "3D" least fit capability in MATLAB that will allow me to approximate a,b given my collection of points (x,y,z)?
From: Rune Allnor on
On 18 Des, 05:03, "Alex " <alexmca...(a)gmail.com> wrote:
> I have a bunch of data points (x,y,z) and I know that these points go asymptotically like z = ax + by for some a,b.  Is there some sort of "3D" least fit capability in MATLAB that will allow me to approximate a,b given my collection of points (x,y,z)?

Yes.

Rune
From: Torsten Hennig on
> I have a bunch of data points (x,y,z) and I know that
> these points go asymptotically like z = ax + by for
> some a,b. Is there some sort of "3D" least fit
> capability in MATLAB that will allow me to
> approximate a,b given my collection of points
> (x,y,z)?

Build a matrix M with rows (x_i,y_i) (1 <= i <= n)
and a vector v = (z_1,...,z_n).
Then M\v gives you the optimal parameters a and b for
your linear least-squares problem from above.

Best wishes
Torsten.
From: Alex on
Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message <862752047.25898.1261123039725.JavaMail.root(a)gallium.mathforum.org>...
> > I have a bunch of data points (x,y,z) and I know that
> > these points go asymptotically like z = ax + by for
> > some a,b. Is there some sort of "3D" least fit
> > capability in MATLAB that will allow me to
> > approximate a,b given my collection of points
> > (x,y,z)?
>
> Build a matrix M with rows (x_i,y_i) (1 <= i <= n)
> and a vector v = (z_1,...,z_n).
> Then M\v gives you the optimal parameters a and b for
> your linear least-squares problem from above.
>
> Best wishes
> Torsten.

Wonderful, thank you.
From: Matt J on
Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message <862752047.25898.1261123039725.JavaMail.root(a)gallium.mathforum.org>...
> > I have a bunch of data points (x,y,z) and I know that
> > these points go asymptotically like z = ax + by for
> > some a,b. Is there some sort of "3D" least fit
> > capability in MATLAB that will allow me to
> > approximate a,b given my collection of points
> > (x,y,z)?
>
> Build a matrix M with rows (x_i,y_i) (1 <= i <= n)
> and a vector v = (z_1,...,z_n).
> Then M\v gives you the optimal parameters a and b for
> your linear least-squares problem from above.

Just to be clear, you would do this for data points (x_i,y_i) taken from the asymptotic region of the trend in z...
> Torsten.