Mercurial > hg > mauch-mirex-2010
annotate _misc/general/.svn/text-base/qnorm.m.svn-base @ 8:b5b38998ef3b
added all that other stuff
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:54:25 +0100 |
parents | |
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 |