Reduce PSD or Spectrum imat_fn to 1/N octaves.
g=octaven(f)
g=octaven(f,3)
g=octaven(f,3,'ansi')
g=octaven(f,1,'silent')
OCTAVEN takes a function F with "narrow band" PSD, Spectrum, Auto Spectrum, or Cross Spectrum data, and reduces it to "1/N octave" PSD data. If N is not specified, it will default to 1. The abscissa must be evenly spaced. Cross Spectra reduction is performed with the complex data so that phase is preserved.
The optional input argument 'silent' suppresses any output.
By default OCTAVEN does not use the "preferred" frequencies. Instead, the following formulas are used:
center = 1000*2^(i/N)
where i = 0 for f0 = 1000 Hz
upper = center * 2^(1/2/N)
lower = center / 2^(1/2/N)
To use the ANSI/ISO standard frequencies defined in ISO R 266 and ANSI S1.6-1984, pass in the string 'ansi'. If octave or third octave reduction is requested, the standard frequencies will be used. Otherwise OCTAVEN will issue a warning and use the above formulas instead.
The output function G will contain the 1/N octave functions. Values are returned for every 1/N octave in which some narrow band data was found. For the first band, the value at the beginning of the band is assumed to be equal to the 1st value in the band. For the last band, the value at the end of the band is assumed to be equal to the last value in the band.
By default the reduced value is the average across each 1/N octave. If the optional input string 'rms' is supplied, OCTAVEN will return the result as the RMS of the reduced input. PSDs will be converted to linear spectra.