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

    %% RMS Value 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).

%%
% Compute the RMS value of a vector consisting of the integers 1 to 10.
x = 1:10;
hrms = dsp.RMS('Dimension','row');
rmsval = hrms(x)