peak2peak
Compute signal maximum to minimum differences.
Syntax
r = peak2peak(x)
r = peak2peak(x,dim)
Inputs
- x
- Data sample.
- dim
- Dimension on which to perform the calculation.
Outputs
- r
- Peak to RMS differences.
Examples
Vector example:
x = [9.3, 10.6, 13.3, 15.1, 18.2, 11.9];
r = peak2peak(x)
r = 8.9
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 = peak2peak(x)
r = [Matrix] 1 x 2
8.90000 7.10000
Comments
The function computes the difference of the maximum value to the minimum value for each vector in x along the dimension of interest.
For complex signals, peak magnitudes are considered.