Mercurial > hg > smallbox
comparison Problems/private/normcols.m @ 10:207a6ae9a76f version1.0
(none)
author | idamnjanovic |
---|---|
date | Mon, 22 Mar 2010 15:06:25 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:28f2b5fe3483 | 10:207a6ae9a76f |
---|---|
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))); |