annotate support/normcol.m @ 6:e2a029a70df3

rearranged directories
author danieleb@code.soundsoftware.ac.uk
date Thu, 16 Jun 2011 13:43:16 +0100
parents normcol.m@ee2a86d7ec07
children 2e42f5fb764d
rev   line source
danieleb@3 1 function [x n] = normcol(x)
danieleb@3 2 %NORMCOL normalise the columns to unit length
danieleb@3 3 %
danieleb@3 4 % [x n] = normcol(x)
danieleb@3 5 %
danieleb@3 6 % normalises the columns of the input matrix x and returns a vector n
danieleb@3 7 % containing the initial norm of the columns.
danieleb@3 8 %
danieleb@3 9 % ----------------------------------------------------------- %
danieleb@3 10 % Daniele Barchiesi, daniele.barchiesi@eecs.qmul.ac.uk %
danieleb@3 11 % Centre for Digital Music, Queen Mary University of London %
danieleb@3 12 % Apr. 2011 %
danieleb@3 13 % ----------------------------------------------------------- %
danieleb@3 14 n = sqrt(sum(conj(x).*x,1));
danieleb@3 15 x = x*diag(1./n);