[Master Index]
[Index for PublicToolbox/regutools]
csvd
(PublicToolbox/regutools/csvd.m in BrainStorm 2.0 (Alpha))
Function Synopsis
[U,s,V] = csvd(A,tst)
Help Text
CSVD Compact singular value decomposition.
 s = csvd(A)
 [U,s,V] = csvd(A)
 [U,s,V] = csvd(A,'full')
 Computes the compact form of the SVD of A:
    A = U*diag(s)*V',
 where
    U  is  m-by-min(m,n)
    s  is  min(m,n)-by-1
    V  is  n-by-min(m,n).
 If a second argument is present, the full U and V are returned.
Cross-Reference Information
This function is called by
- bsvd                               C:\BrainStorm_2001\PublicToolbox\regutools\bsvd.m
 
- regudemo                           C:\BrainStorm_2001\PublicToolbox\regutools\regudemo.m
 
Listing of function C:\BrainStorm_2001\PublicToolbox\regutools\csvd.m
function [U,s,V] = csvd(A,tst)
%CSVD Compact singular value decomposition.
%
% s = csvd(A)
% [U,s,V] = csvd(A)
% [U,s,V] = csvd(A,'full')
%
% Computes the compact form of the SVD of A:
%    A = U*diag(s)*V',
% where
%    U  is  m-by-min(m,n)
%    s  is  min(m,n)-by-1
%    V  is  n-by-min(m,n).
%
% If a second argument is present, the full U and V are returned.
% Per Christian Hansen, UNI-C, 06/22/93.
if (nargin==1)
  if (nargout > 1)
    [m,n] = size(A);
    if (m >= n)
      [U,s,V] = svd(full(A),0); s = diag(s);
    else
      [V,s,U] = svd(full(A)',0); s = diag(s);
    end
  else
    U = svd(full(A));
  end
else
  if (nargout > 1)
    [U,s,V] = svd(full(A)); s = diag(s);
  else
    U = svd(full(A));
  end
end
Produced by color_mat2html, a customized BrainStorm 2.0 (Alpha) version of mat2html on Tue Oct 12 12:05:14 2004
Cross-Directory links are: ON