Compute cumulative root mean square (RMS) from the supplied frequency domain imat_fn.
g=cumrms(f)
g=cumrms(f,'reverse')
CUMRMS calculates the cumulative root mean square value of the supplied frequency domain imat_fn, using the trapezoidal rule to integrate the function. CUMRMS looks at the AbscissaDataType attribute to determine if the function is in the frequency domain. It returns the output in the imat_fn G.
The optional input string specifying that CUMRMS should calculate the cumulative RMS in reverse order, from highest frequency to lowest.
If the function in F is a frequency domain function and is a spectrum (any type) or frequency response function, RMS will be calculated in one of several ways. The AmplitudeUnits and Normalization attributes become very important.
If the AmplitudeUnits are squared and normalized per Hz, the RMS is calculated by taking the square root area under the curve. Otherwise, the bandwidth (DF) is not used in the calculation.
RMS values for linear amplitude functions such as spectra and FRF are calculated by taking the square root of the sum of the absolute values of the amplitude squared.
RMS determines whether the frequency domain function is linear or squared by looking at Amplitude Units and OrdNumDataType. If either of these attributes contain the word 'squared', or FunctionType is Power Spectral Density, Auto Spectrum, or Cross Spectrum, the units are considered to be squared.
RMS also takes into account the AmplitudeUnits attribute. If it is 'Peak', the calculated RMS value from the above formulas will be multiplied by 1/sqrt(2). If it is 'Half-Peak', it will be multiplied by sqrt(2).