
% lyngby_uis_svd       - Script executed for SVD analysis
%
%       See also LYNGBY, LYNGBY_SVD_GLOBAL, LYNGBY_UI_GLOBAL.
%
% $Id: lyngby_uis_svd.m,v 1.2 2002/03/21 20:48:15 fnielsen Exp $ 


	  
    [RESULT_SVD_U, RESULT_SVD_S, RESULT_SVD_V] = ...
	lyngby_svd(XN, 'ReduceComponents', SVD_COMPONENTS);
	  
    
    % Phase of eigensequence.
    s = sign(sum(repmat(PN,1,size(RESULT_SVD_U,2)) .*  RESULT_SVD_U));
    i = find(s<0);
    
    % Change sign if negative phase
    RESULT_SVD_U(:,i) = -RESULT_SVD_U(:,i);
    RESULT_SVD_V(:,i) = -RESULT_SVD_V(:,i);