How to do SVD without function..?
이전 댓글 표시
I have a Three parameters Xi,Yi,Zi.. and I am finding a SVD of them..
A=[Xi,Yi,Zi,ones(length(Xi),1)];
[U,S,V]=svd(A);
ss=diag(S);
i=find(ss==min(ss));
coeff=V(:,min(i));
coeff=coeff/norm(coeff(1:3),2);
and i am getting four parameters for plane.. the code is ok.. but,
is there any method to do SVD without using SVD function..?
댓글 수: 6
Walter Roberson
2012년 11월 26일
i=find(ss==min(ss));
can be replaced with
[junk, i] = min(ss);
and you will not need to take min(i) on the next line, just i.
Walter Roberson
2012년 11월 26일
Is there a particular reason for wanting to do SVD without using the SVD function? Knowing your reason might help people select the best alternative for you.
Lalit Patil
2012년 11월 26일
Lalit Patil
2012년 11월 26일
Walter Roberson
2012년 11월 26일
The blog has a bunch of links.
답변 (1개)
Walter Roberson
2012년 11월 26일
0 개 추천
댓글 수: 2
Lalit Patil
2012년 11월 27일
Walter Roberson
2012년 11월 27일
That is the code that is used by MATLAB (though it is not impossible that Mathworks has tweaked the code.) Everything that is documented about exactly how MATLAB's SVD function operates is in that source code (when you include the related files for the routines it calls.)
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!