markraz
Full Member
- Joined
- Feb 19, 2014
- Messages
- 338
Hi, I have several hundred points in a matrix that are almost planar. Is it true that I can find the best fit plane using the following ??
x = ((A^t * A) ^-1) * A^t * b
where A is my matrix in form of:
[ [x y 1.0]
[x y 1.0]
[x y 1.0]
[x y 1.0]
[x y 1.0]
[more xy values.......]]
b are my z values
b =
[ [z]
[z]
[z]
[z]
[z]
[ more z values]]
^t = is matrix transform
^-1 = is matrix inverse
* = is multiplication
Thanks
x = ((A^t * A) ^-1) * A^t * b
where A is my matrix in form of:
[ [x y 1.0]
[x y 1.0]
[x y 1.0]
[x y 1.0]
[x y 1.0]
[more xy values.......]]
b are my z values
b =
[ [z]
[z]
[z]
[z]
[z]
[ more z values]]
^t = is matrix transform
^-1 = is matrix inverse
* = is multiplication
Thanks