Code covered by the BSD License
-
TCLANEIG(A,n,quality, Anorm, ...
TCLANEIG Compute factor space for specified approx. quality.
-
compute_int(mu,j,delta,eta,LL...
COMPUTE_INT: Determine which Lanczos vectors to reorthogonalize against.
-
lanpro(A,nin,kmax,r,options,....
LANPRO Lanczos tridiagonalization with partial reorthogonalization
-
pythag(y,z)
-
refinebounds(D,bnd,tol1)
REFINEBONDS Refines error bounds for Ritz values based on gap-structure
-
reorth(Q,r,normr,index,alpha,...
REORTH Reorthogonalize a vector using iterated Gram-Schmidt
-
tcdoc_getargs(pnames,dflts,va...
STATGETARGS Process parameter name/value pairs for statistics functions
-
tcslsi(data, varargin)
TCSLSI Sequrntial algorithm of dimension reduction
-
tqlb_matlab(alpha,beta)
TQLB: Compute eigenvalues and top and bottom elements of
-
View all files
from
Sequential Latent Semantic Indexing
by Vital
Sequential version of the latent semantic indexing method
|
| pythag(y,z)
|
function x = pythag(y,z)
%PYTHAG Computes sqrt( y^2 + z^2 ).
%
% x = pythag(y,z)
%
% Returns sqrt(y^2 + z^2) but is careful to scale to avoid overflow.
% Christian H. Bischof, Argonne National Laboratory, 03/31/89.
[m n] = size(y);
if m>1 | n>1
y = y(:); z=z(:);
rmax = max(abs([y';z']))';
id=find(rmax==0);
if length(id)>0
rmax(id) = 1;
x = rmax.*sqrt((y./rmax).^2 + (z./rmax).^2);
x(id)=0;
else
x = rmax.*sqrt((y./rmax).^2 + (z./rmax).^2);
end
x = reshape(x,m,n);
else
rmax = max(abs([y;z]));
if (rmax==0)
x = 0;
else
x = rmax*sqrt((y/rmax)^2 + (z/rmax)^2);
end
end
|
|
Contact us at files@mathworks.com