Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fitting a Plane to 3-D Data

Subject: Fitting a Plane to 3-D Data

From: Jose Miguel Jauregui

Date: 20 Oct, 2009 15:06:02

Message: 1 of 2

Hi every one,

I need to fit a plane to 3-D data ((x1,y1,z1)....(x16,y16,z16)), with a peculiarity, I need that the plane contains the point Xa,Ya,Za.

I've read matlab statistics toolbox help on Fitting an Orthogonal Regression Using Principal Components Analysis (fitting a plane to 3-D data) and I think I'd need just a little modification of this function PRINCOMP.m

Could anyone help me on how to find the plane equation to this problem?
Thank you very much

Jose

Subject: Fitting a Plane to 3-D Data

From: Matt

Date: 20 Oct, 2009 15:28:02

Message: 2 of 2

"Jose Miguel Jauregui" <aupaosasuna60@hotmail.com> wrote in message <hbkjkq$sd6$1@fred.mathworks.com>...
> Hi every one,
>
> I need to fit a plane to 3-D data ((x1,y1,z1)....(x16,y16,z16)), with a peculiarity, I need that the plane contains the point Xa,Ya,Za.

Perhaps as follows. Form the data matrix

A=[x(:)-Xa, y(:)-Ya, z(:)-Za];

[u,s,v]=svd(A,0);

N=v(:,end); %plane normal

d=dot(N, [Xa,Ya,Za]);

Then the equation for the fitted plane is

dot(N,[x,y,z])=d;






> I've read matlab statistics toolbox help on Fitting an Orthogonal Regression Using Principal Components Analysis (fitting a plane to 3-D data) and I think I'd need just a little modification of this function PRINCOMP.m
>
> Could anyone help me on how to find the plane equation to this problem?
> Thank you very much
>
> Jose

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us