annotate examples/private/normcols.m @ 1:7750624e0c73 version0.5

(none)
author idamnjanovic
date Thu, 05 Nov 2009 16:36:01 +0000
parents
children
rev   line source
idamnjanovic@1 1 function y = normcols(x)
idamnjanovic@1 2 %NORMCOLS Normalize matrix columns.
idamnjanovic@1 3 % Y = NORMCOLS(X) normalizes the columns of X to unit length, returning
idamnjanovic@1 4 % the result as Y.
idamnjanovic@1 5 %
idamnjanovic@1 6 % See also ADDTOCOLS.
idamnjanovic@1 7
idamnjanovic@1 8
idamnjanovic@1 9 % Ron Rubinstein
idamnjanovic@1 10 % Computer Science Department
idamnjanovic@1 11 % Technion, Haifa 32000 Israel
idamnjanovic@1 12 % ronrubin@cs
idamnjanovic@1 13 %
idamnjanovic@1 14 % April 2009
idamnjanovic@1 15
idamnjanovic@1 16
idamnjanovic@1 17 y = x*spdiag(1./sqrt(sum(x.*x)));