Mercurial > hg > mauch-mirex-2010
annotate _misc/general/qnorm.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function s = qnorm(inmat, varargin) |
matthiasm@8 | 2 dim = 1; |
matthiasm@8 | 3 if nargin > 1 |
matthiasm@8 | 4 q = varargin{1}; |
matthiasm@8 | 5 if nargin > 2 |
matthiasm@8 | 6 dim = varargin{2}; |
matthiasm@8 | 7 end |
matthiasm@8 | 8 else |
matthiasm@8 | 9 q = 2; |
matthiasm@8 | 10 end |
matthiasm@8 | 11 if ~(q == Inf) |
matthiasm@8 | 12 s = sum(inmat.^q,dim).^(1/q); |
matthiasm@8 | 13 else |
matthiasm@8 | 14 s = max(inmat,[],dim); |
matthiasm@8 | 15 end |