# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

Root-sum-of-squares level

## Syntax

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

## Description

`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`.

## Input Arguments

 `X` Real- or complex-valued input vector or matrix. By default, `rssq` acts along the first nonsingleton dimension of `X`. `DIM` Dimension for root-sum-of-squares (RSS) level. The optional `DIM` input argument specifies the dimension along which to compute the RSS level. Default: First nonsingleton dimension

## Output Arguments

 `Y` Root-sum-of-squares level. For vectors, `Y` is a real-valued scalar. For matrices, `Y` contains the RSS levels computed along the specified dimension, `DIM`. By default, `DIM` is the first nonsingleton dimension.

## Examples

collapse all

Compute 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 ```

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 ```

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 ```

collapse all

### Root-Sum-of-Squares Level

The root-sum-of-squares (RSS) level of a vector, X, is

`${X}_{\text{RSS}}=\sqrt{\sum _{n=1}^{N}{|{X}_{n}|}^{2}},$`

with the summation performed along the specified dimension. The RSS is also referred to as the 2 norm.

## References

[1] IEEE® Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003.