function Arms=rms(Ain,divr) x=linspace(0,2*%pi,divr) y=sin(x) Arms=Ain*sqrt(mean(y.^2)) endfunction