You are here : matlabSignal Processingrssq

rssq() - Signal Processing

Y = rssq(X) returns
the root-sum-of-squares (RSS) level, Y, of the
input, X. If X is a row
or column vector, Y is a real-valued scalar.
For matrices, Y contains the RSS levels computed
along the first nonsingleton dimension. For example, if Y is
an N-by-M matrix with N > 1, Y is a 1-by-M row
vector containing the RSS levels of the columns of Y.Y = rssq(X,DIM) computes
the RSS level of X along the dimension, DIM.


Syntax

Y = rssq(X)Y = rssq(X,DIM)


Example

RSS Level of SinusoidOpen This ExampleCompute the RSS level of a 100 Hz sinusoid sampled at 1 kHz.t = 0:0.001:1-0.001;
x = cos(2*pi*100*t);

y = rssq(x)

y =

   22.3607

RSS Levels of 2-D MatrixOpen This Example
Create a matrix where each column is a 100 Hz sinusoid sampled at 1 kHz with a different amplitude. The amplitude is equal to the column index.
Compute the RSS levels of the columns.t = 0:0.001:1-0.001;
x = cos(2*pi*100*t)'*(1:4);

y = rssq(x)

y =

   22.3607   44.7214   67.0820   89.4427

RSS Levels of 2-D Matrix Along Specified DimensionOpen This Example
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.
Compute the RSS 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 = rssq(x,2)

y =

   22.3607
   44.7214
   67.0820
   89.4427


Output / Return Value


Limitations


Alternatives / See Also


Reference