nanvc = nanvar(x,dim) returns the variance of complex data, treating the real and imaginary parts separately. SJCM
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;