Mercurial > hg > lots
view l1overl2.m @ 4:e23a23349e31
Added inverse transform
author | danieleb@code.soundsoftware.ac.uk |
---|---|
date | Thu, 16 Jun 2011 13:16:29 +0100 |
parents | ee2a86d7ec07 |
children |
line wrap: on
line source
function z = l1overl2(X) %L1OVERL2 ratio between l1 and l2 norm % % USAGE % z = l1overl2(x) % % INPUT % x: input vector or matrix. If matrix, the function acts columnwise % returning one value for each column. % % OUTPUT % z: the ratio ||x||_1/||x||_2 % % SEE ALSO % NORM % Author(s): Daniele Barchiesi % Copyright QMUL % $Revision: 1 nCols = size(X,2); z = zeros(nCols,1); for i=1:nCols z(i) = norm(X(:,i),1)/norm(X(:,i),2); end %EOF