Hi,

I just confirmed Stefan's answer on one of the examples in 
http://www.mathworks.co.jp/matlabcentral/newsreader/view_thread/262996

matlab:

  A = randn(100,2)*[2 0;3 0;-1 2]';
  A = A + randn(size(A))/3;
  [U,S,V] = svd(A);
  X = V(:,end)

python:

  from numpy import *
  A = random.randn(100,2)*mat([[2,3,-1],[0,0,2]])
  A = A + random.randn(100,3)/3.0
  u,s,vh = linalg.linalg.svd(A)
  v = vh.conj().transpose()
  print v[:,-1] 

It works! Thanks Peter for bringing this up and Stefan for answering!

Huan




_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to