Main Content

fvtool

Visualize filter bank

Since R2019a

Description

example

fvtool(obj) visualizes the filters in the filter bank using the Filter Visualization Tool (FVTool).

example

fvtool(obj,ind) visualizes the filters corresponding to the elements in the vector ind.

example

fvtool(___,N=n) specifies the number of points used to visualize the filters.

Examples

collapse all

Create an octaveFilterBank object. Call fvtool to visualize the filter bank.

octFiltBank = octaveFilterBank;
fvtool(octFiltBank)

Figure Figure 1: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains 10 objects of type line.

ans = 
  Figure (filtervisualizationtool) with properties:

      Number: []
        Name: 'Figure 1: Magnitude Response (dB)'
       Color: [0.9400 0.9400 0.9400]
    Position: [348 376 583 437]
       Units: 'pixels'

  Use GET to show all properties

To visualize a subset of filters in the filter bank, specify the second argument as a row vector of indices between one and the number of filters in the filter bank. If not specified, fvtool visualizes 1 to N filters of the filter bank, where N is the smallest of octFiltBank.NumFilters and 64. Visualize the ninth filter.

fvtool(octFiltBank,9)

Figure Figure 2: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains an object of type line.

ans = 
  Figure (filtervisualizationtool) with properties:

      Number: []
        Name: 'Figure 2: Magnitude Response (dB)'
       Color: [0.9400 0.9400 0.9400]
    Position: [348 376 583 437]
       Units: 'pixels'

  Use GET to show all properties

To specify the number of points in the frequency response, use the N name-value argument. Specify that the frequency response contains 8192 points.

fvtool(octFiltBank,N=8192)

Figure Figure 3: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains 10 objects of type line.

ans = 
  Figure (filtervisualizationtool) with properties:

      Number: []
        Name: 'Figure 3: Magnitude Response (dB)'
       Color: [0.9400 0.9400 0.9400]
    Position: [348 376 583 437]
       Units: 'pixels'

  Use GET to show all properties

Create a gammatoneFilterBank object. Call fvtool to visualize the filter bank.

gammaFiltBank = gammatoneFilterBank;
fvtool(gammaFiltBank);

Figure Figure 1: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains 32 objects of type line.

To visualize a subset of filters in the filter bank, specify the second argument as a row vector of indices between one and the number of filters in the filter bank. If not specified, fvtool visualizes 1 to N filters of the filter bank, where N is the smallest of gammaFiltBank.NumFilters and 64. Visualize the ninth filter.

fvtool(gammaFiltBank,9);

Figure Figure 2: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains an object of type line.

To specify the number of points in the frequency response, use the N name-value argument. Specify that the frequency response contains 8192 points.

fvtool(gammaFiltBank,N=8192);

Figure Figure 3: Magnitude Response (dB) contains an axes object. The axes object with title Magnitude Response (dB), xlabel Frequency (kHz), ylabel Magnitude (dB) contains 32 objects of type line.

Input Arguments

collapse all

Object to get filter frequency responses from, specified as an object of gammatoneFilterBank or octaveFilterBank.

Indices of filters to calculate frequency responses from, specified as a row vector of integers with values in the range [1, N]. N is the total number of filters designed by obj.

Number of points used to visualize the filters, specified as a positive integer.

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

Version History

Introduced in R2019a