Y = peak2rms(X) returns
the ratio of the largest absolute value in X to
the root-mean-square (RMS) value of X. peak2rms operates
along the first nonsingleton dimension of X.
For example, if X is a row or column vector, Y is
a real-valued scalar. If Y is an N-by-M matrix
with N>1, Y is a 1-by-M row vector containing
the peak-magnitude-to-RMS levels of the columns of Y.

Y = peak2rms(X,DIM) computes
the peak-magnitude-to-RMS level of X along the
dimension, DIM.

Input Arguments

X

Real– or complex-valued input vector or matrix. By default, peak2rms acts
along the first nonsingleton dimension of X.

DIM

Dimension for peak-magnitude-to-RMS ratio. The optional DIM input
argument specifies the dimension along which to compute the peak-magnitude-to-RMS
level.

Default: First nonsingleton dimension

Output Arguments

Y

Peak-magnitude-to-RMS ratio. For vectors, Y is
a real-valued scalar. For matrices, Y contains
the peak-magnitude-to-RMS levels computed along the specified dimension, DIM.
By default, DIM is the first nonsingleton dimension.