rmsRoot-mean-square value
For a given vector
where
r = rms(A)r = rms(A, nanFlag)A is empty, r is an empty array.A is a scalar, r is equal to A.A is a vector, r is the RMS value of elements along the longer dimension of A.A is a matrix or multi-dimensional array, elements of s are RMS values of vectors of A along the first non-singleton dimension.nanFlag should be either 'includeNaN' or 'omitNaN', which indicate that NaN values in A should be included or omitted when calculating r, respectively.r = rms(A, dim)r = rms(A, dim, nanFlag)dim should be a dimension number, i.e., a real positive integer scalar.r = rms(A) and r = rms(A, nanFlag), except that r contains RMS values of vectors along the dim-th dimension.r = rms(A, dimVec)r = rms(A, dimVec, nanFlag)dimVec should be a vector of dimension numbers, i.e., vector of real positive integer scalars.r = rms(A) and r = rms(A, nanFlag), except that r contains RMS values of elements in the spaces of dimensions dimVec(1), dimVec(2), ..., dimVec(end).r = rms(A, 'all')r = rms(A, 'all', nanFlag)r = rms(A) and r = rms(A, nanFlag), except that r contains RMS values of all elements of A.r is always a scalar.