%% Peak-Magnitude-to-RMS Ratio of Sinusoid
% Compute the peak-magnitude-to-RMS ratio of a 100 Hz sinusoid sampled at 1 kHz.

t = 0:0.001:1-0.001;
x = cos(2*pi*100*t);

y = peak2rms(x)

% Copyright 2015 The MathWorks, Inc.