Home > custom > colfilt_filters > ulimit.m

ulimit

PURPOSE ^

assigns upper 30% quantile to all cells

SYNOPSIS ^

function r=ulimit(X)

DESCRIPTION ^

 assigns upper 30% quantile to all cells

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function r=ulimit(X)
0002 % assigns upper 30% quantile to all cells
0003 r=ones(size(X,1),size(X,2));
0004 n=sum(isnan(X(:)));
0005 if n>0
0006     if n>=numel(X)/2
0007         r=nan;
0008         return
0009     else
0010         X(isnan(X))=[];
0011     end
0012 end    
0013 r=r.*quantile(X(:),0.7);

Generated on Tue 24-Feb-2009 19:14:50 by m2html © 2003