Main Content

centerFrequencies

Compute center frequencies

Description

w = centerFrequencies(obj) returns a vector of normalized frequencies, w, containing the center frequencies of all the bandpass filters in the dsp.Channelizer System object™.

example

f = centerFrequencies(obj,Fs) returns a vector of center frequencies in Hz, using the sample rate Fs.

example

Examples

collapse all

Compute the normalized center frequencies of the bandpass filters in a channelizer using the centerFrequencies function.

channelizer = dsp.Channelizer;
w = centerFrequencies(channelizer)
w = 1×8

   -3.1416   -2.3562   -1.5708   -0.7854         0    0.7854    1.5708    2.3562

To compute the frequencies in Hz, pass a sampling frequency. Frequency in Hz, f, equals f=(ω/2π)×Fs, where w is frequency in radians, and Fs is the sampling rate.

f = centerFrequencies(channelizer,44100)
f = 1×8
104 ×

   -2.2050   -1.6538   -1.1025   -0.5513         0    0.5513    1.1025    1.6538

Input Arguments

collapse all

Input filter, specified as a dsp.Channelizer System object.

Sample rate used to compute the center frequencies in Hz, specified as a positive scalar.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Output Arguments

collapse all

Normalized frequencies containing the center frequencies of all the bandpass filters in the channelizer, returned as a row vector. The length of the vector equals the number of frequency bands.

Data Types: double

Center frequencies in Hz, returned as a row vector. The length of the vector equals the number of frequency bands. To return the frequencies in Hz, input the sample rate, Fs. Frequency in Hz is given by [w/(2π)]×Fs, where w is the normalized frequency in rad/sample, and Fs is the sampling rate in Hz.

Data Types: double

Version History

Introduced in R2017b