r=rms(x) Calculate the rms r=sqrt(mean(x.*conj(x)))
0001 function r=rms(x,dim) 0002 % r=rms(x) 0003 % 0004 % Calculate the rms r=sqrt(mean(x.*conj(x))) 0005 0006 if(~exist('dim')) 0007 r=sqrt(nanmean(x.*conj(x))); 0008 else 0009 r=sqrt(nanmean(x.*conj(x),dim)); 0010 end