[Numpy-discussion] 3d plane to point cloud fitting using SVD

Stéfan van der Walt stefan at sun.ac.za
Wed May 5 06:26:51 EDT 2010


Hi Peter

On 5 May 2010 10:02, Peter Schmidtke <pschmidtke at mmb.pcb.ub.es> wrote:
> u,s,vh=numpy.linalg.linalg.svd(M)
>
> Then in the matlab analog they use the last column of vh to get the a,b,c
> coefficients for the equation
> a,b,c=vh[:, -1] in numpy

Note that vh is the conjugate transpose of v.  You are probably
interested in the rows of vh (the columns of V in MATLAB parlance).

Regards
Stéfan



More information about the NumPy-Discussion mailing list