Mercurial > hg > smallbox
annotate examples/private/normcols.m @ 5:f44689e95ea4
(none)
author | idamnjanovic |
---|---|
date | Mon, 22 Mar 2010 10:43:01 +0000 |
parents | 7750624e0c73 |
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))); |