The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » sci.math.* » sci.math.num-analysis

Topic: Fitted plane has to pass through the origin
Replies: 3   Last Post: Dec 28, 2012 9:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Peter Spellucci

Posts: 221
Registered: 11/9/09
Re: Fitted plane has to pass through the origin
Posted: Dec 28, 2012 9:45 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply writes:
>Sorry for the wrong object, i mean "Fitted plane has to pass through a poi=

I assume you know this point (otherwise this would become a hard combinatorical job)
But then your plane will read

x in plane <=> (x-x0)^t n=0 , n^t n =1
and only the normal vector n must be found. Now consider your data points x(i):
they can be written as
with xp(i) a multiple of n and xh(i) the projection of x(i) onto that plane.
xp(i)=alpha(i)*n alpha(i) scalar
and |alpha(i)| is the distance of x(i) from that plane.
If you want to fit in the sense of minimal sum of orthogonal distances squared
then there remains the problem

sum_i (x(i)-x0)^t *n)^2 = min w.r.t. n, n^t n=1
( ^t menas transposition, makes a row from a column)
now write the system of (x(i)-x0)^t as a matrix, N*3 in dimension, with
N the number of the remaining points to be fitted, say
This X has a singular values decomposition
X = U*S*V^t

U is N*N orthonormal, S is N*3 zero outside the diagonal
and with nonnegative diagonal entries (the singular values)
and V is 3*3 orthonormal.
If n has length 1, then also V^t n= n_v
and given n_v you can get n via
n = V n_v
Now set n_v = (0,0,1)' (assuming that the third singular value is the
smallest one). Then the length of
X n = U S n_v = U(.,3)s(3,3)
is obviously the smallest possible, and you get n as the third column of
V or the third row of V^t.
Hence input of X into a svd code solves your problem.
svd is in lapack (or matlab or whatever you want)
you may paste X also into the corresponding input window here:
least squares-> the singular value decomposition

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.