peak2rms
Compute signal peak to rms ratios.
Syntax
r = peak2rms(x)
r = peak2rms(x,dim)
Inputs
- x
- Data sample.
- dim
- Dimension on which to perform the calculation.
Outputs
- r
- Peak to RMS ratios.
Examples
Vector example:
x = [9.3, 10.6, 13.3, 15.1, 18.2, 11.9];
r = peak2rms(x)
r = 1.35868827
Matrix
example:
x = [9.3, 4.8; 10.6, 6.6; 11.9, 8.0; 13.3, 9.3; 15.1, 10.6; 18.2, 11.9];
r = peak2rms(x)
r = [Matrix] 1 x 2
1.35869 1.34303
Comments
The function computes the ratio of the maximum absolute value to the rms value for each vector in x along the dimension of interest.
For complex signals, peak magnitudes are considered.