www.gusucode.com > signal 案例源码程序 matlab代码 > signal/RMSLevelsOf2DMatrixAlongSpecifiedDimensionExample.m
%% RMS Levels of 2-D Matrix Along Specified Dimension % Create a matrix where each row is a 100 Hz sinusoid sampled at 1 kHz with % a different amplitude. The amplitude is equal to the row index. % Copyright 2015 The MathWorks, Inc. %% % Compute the RMS levels of the rows specifying the dimension equal to 2 % with the |DIM| argument. t = 0:0.001:1-0.001; x = (1:4)'*cos(2*pi*100*t); y = rms(x,2)