count_freqs_in_band


Purpose

Count the number of frequencies in 1/N octave bands.

Syntax

count=count_freqs_in_band(fmin,fmax)
[count,band]=get_octave_bands(fmin,fmax,n)
[count,band]=get_octave_bands(fmin,fmax,'silent','ansi')
[count,band]=get_octave_bands(fmin,fmax,n,'silent','ansi')

Description

COUNT_FREQS_IN_BAND counts the number of frequencies in 1/N octave bands. It handles both formula-calculated frequency bands and ANSI bands. Please see the help for GET_OCTAVE_BANDS for more details.

FREQS is a vector of frequencies to count. Only frequency 1 Hz and up are counted.

The optional input argument 'silent' suppresses output.

By default COUNT_FREQS_IN_BAND does not use the "preferred" frequencies. Instead, it calculates the frequencies using standard formulas. To use the ANSI/ISO standard frequencies defined in ISO R 266 and ANSI S1.6-1984, pass in the string 'ansi'.

BANDS is a structure containing the frequency band information. See GET_OCTAVE_BANDS for details of its contents.

COUNT is a vector the length of the number of bins containing a count of the frequencies in FREQS that fall into each of the bins.

See also

get_octave_bands