Least Squares using Matrix in 3D

markraz

Full Member
Joined
Feb 19, 2014
Messages
338
Hi, I need to fit some points to a plane in 3D. I found this video on YT that seems to be a good example for how to achieve this but in 2d.
To do this in 3D do I just add an other col/row? and it should work? The final answer would be in form of a normal vector? correct??

Thanks in advance

1589067190935.png

 
Fit some points to what? The video you link to is fitting a linear function to the given points. If that is what you mean then, yes, you need a third column. You will still have two rows because a linear function is of the form "Ax+ B" so you need to find two values, A and B.
 
Fit some points to what? The video you link to is fitting a linear function to the given points. If that is what you mean then, yes, you need a third column. You will still have two rows because a linear function is of the form "Ax+ B" so you need to find two values, A and B.
Hi thanks

I want to fit a set of point 3D points to a plane. I think it may be called a "regression plane". or a fit plane. In the above example the teacher is using 2d points. I need to use 3D points. So my question is, can this 2d method he is using in the video be adapted for use with 3D points in XYZ form? Do I just add a 3rd column to the matrix and then proceed with the same steps he uses?
Thanks
 
Top