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

(none)
author idamnjanovic
date Thu, 05 Nov 2009 16:36:01 +0000
parents
children
comparison
equal deleted inserted replaced
0:5181bee80bc1 1:7750624e0c73
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)));