Thread Closed

3D Least Squares Fit and some Linear Algebra

 
Share Thread Thread Tools
Mar4-10, 07:55 PM   #1
 

3D Least Squares Fit and some Linear Algebra


Hello,

I am trying to write an algorithm to calculate the Least Squares Fit Line of a 3D data set. After doing some research and using Google, I came across this document, http://www.udel.edu/HNES/HESC427/Sph...astSquares.pdf (section 2 in page 8) that explains the algorithm for
It uses something from Linear Algebra I have never seen called Singular Value Decomposition (SVD) to find the direction cosines of the line of best fit. What is SVD? What is a direction cosine? The literal angle between the x,y,z axes and the line?

For simplicity's sake, I'm starting with the points (0.5, 1, 2) ; (1, 2, 6) ; (2, 4, 7). So the A matrix, as denoted by the document is (skipping the mean and subtractions)
[tex]A = \left \begin{array} {ccc}
[-1.6667 & -1.1667 & -2.8333 \\
-2.0000 & -1.0000 & 3.0000 \\
-2.3333 & -0.3333 & 2.6667 \end{array} \right][/tex]

and the SVD of A is
[tex]SVD(A) = \left \begin{array} {ccc}
[6.1816 \\
0.7884 \\
0.0000 \end{array} \right][/tex]
but the document says "This matrix A is solved by singular value decomposition. The smallest singular value
of A is selected from the matrix and the corresponding singular vector is chosen which
the direction cosines (a, b, c)" What does that mean?

Any help will greatly be appreciated. Note: I am working in MATLAB R2009a

Thank you in advance!

*NOTE* I POSTED THIS IN THE WRONG MATH FORUM AND CANNOT DELETE THE FIRST POST.
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Bird's playlist could signal mental strengths and weaknesses
>> Minus environment, patterns still emerge: Computational study tracks E. coli cells' regulatory mechanisms
>> Bacterium uses natural 'thermometer' to trigger diarrheal disease, scientists find
Thread Closed
Thread Tools


Similar Threads for: 3D Least Squares Fit and some Linear Algebra
Thread Forum Replies
Uncertainty of linear and non linear least-squares fit Set Theory, Logic, Probability, Statistics 6
Linear Least Squares Fit? General Physics 1
Linear Algebra: Least Squares and vectors Calculus & Beyond Homework 1
Numerical Methods - Linear Least Squares, Non-Linear Least Squares, Optimization Calculus & Beyond Learning Materials 0
Linear Regression, Linear Least Squares, Least Squares, Non-linear Least Squares Linear & Abstract Algebra 4