Home > matutils > nanvarc.m

nanvarc

PURPOSE ^

nanvc = nanvar(x,dim)

SYNOPSIS ^

function nanvc = nanvarc(x,dim)

DESCRIPTION ^

 nanvc = nanvar(x,dim)

  returns the variance of complex data, treating the real and 
    imaginary parts separately.

  SJCM

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function nanvc = nanvarc(x,dim)
0002 % nanvc = nanvar(x,dim)
0003 %
0004 %  returns the variance of complex data, treating the real and
0005 %    imaginary parts separately.
0006 %
0007 %  SJCM
0008 
0009 if(nargin == 1)
0010   dim = min(find(size(x)~=1));
0011   if isempty(dim), dim = 1; end
0012 end
0013 
0014 r = nanvar(real(x), [], dim);
0015 i = nanvar(imag(x), [], dim);
0016 nanvc = complex(r,i);
0017 
0018 return;

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005