function Arms=frms(Ain,divr) x=0:divr:2*pi; y=sin(x); Arms=Ain*sqrt(mean(y.^2)); endfunction