Mercurial > hg > smallbox
comparison Problems/private/normcols.m @ 61:42fcbcfca132
(none)
author | idamnjanovic |
---|---|
date | Tue, 15 Mar 2011 12:21:31 +0000 |
parents | 207a6ae9a76f |
children |
comparison
equal
deleted
inserted
replaced
60:ad36f80e2ccf | 61:42fcbcfca132 |
---|---|
1 function y = normcols(x) | |
2 %NORMCOLS Normalize matrix columns. | |
3 % Y = NORMCOLS(X) normalizes the columns of X to unit length, returning | |
4 % the result as Y. | |
5 % | |
6 % See also ADDTOCOLS. | |
7 | |
8 | |
9 % Ron Rubinstein | |
10 % Computer Science Department | |
11 % Technion, Haifa 32000 Israel | |
12 % ronrubin@cs | |
13 % | |
14 % April 2009 | |
15 | |
16 | |
17 y = x*spdiag(1./sqrt(sum(x.*x))); |