www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/PeaktoRMSRatioOfVectorInputExample.m

    %% Peak-to-RMS Ratio of Vector Input

%%
% *Note*: This example runs only in R2016b or later. If you are using an 
% earlier release, replace each call to the function with the equivalent 
% |step| syntax. For example, myObject(x) becomes step(myObject,x).

%%
% Determine the peak-to-RMS ratio of a vector input.
in1 = (1:10)';
h1 = dsp.PeakToRMS;
y1 = h1(in1)