Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Fitted plane has to pass through the origin
Posted:
Dec 28, 2012 9:45 AM


fparaggio@gmail.com writes: >Sorry for the wrong object, i mean "Fitted plane has to pass through a poi= >nt"=20 >Thanks >Francesco >
I assume you know this point (otherwise this would become a hard combinatorical job) But then your plane will read
x in plane <=> (xx0)^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 x(i)=xp(i)+xh(i) with xp(i) a multiple of n and xh(i) the projection of x(i) onto that plane. Hence 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 X. 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: http://numawww.mathematik.tudarmstadt.de least squares> the singular value decomposition (alpha=0) hth peter



