danieleb@3: function [x n] = normcol(x) danieleb@3: %NORMCOL normalise the columns to unit length danieleb@3: % danieleb@3: % [x n] = normcol(x) danieleb@3: % danieleb@3: % normalises the columns of the input matrix x and returns a vector n danieleb@3: % containing the initial norm of the columns. danieleb@3: % danieleb@3: % ----------------------------------------------------------- % danieleb@3: % Daniele Barchiesi, daniele.barchiesi@eecs.qmul.ac.uk % danieleb@3: % Centre for Digital Music, Queen Mary University of London % danieleb@3: % Apr. 2011 % danieleb@3: % ----------------------------------------------------------- % danieleb@3: n = sqrt(sum(conj(x).*x,1)); danieleb@3: x = x*diag(1./n);