function y = rms(x) %RMS Calculate Root Mean Square of a signal % y = rms(x) calculates RMS (Root Mean Square) of input signal x. % % 2003-01-09 by MARUI Atsushi % 2004-10-30 now proper rms calculation if length(x)~=size(x,1) x = x'; end y = sqrt( sum(x .^ 2) / length(x) );