annotate Problems/private/normcols.m @ 68:f2ca04532eac

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