Image Processing Toolbox User's Guide Previous page   Next Page
freqz2

Compute two-dimensional frequency response

Syntax

Description

[H,f1,f2] = freqz2(h,n1,n2) returns H, the n2-by-n1 frequency response of h, and the frequency vectors f1 (of length n1) and f2 (of length n2). h is a two-dimensional FIR filter, in the form of a computational molecule. f1 and f2 are returned as normalized frequencies in the range -1.0 to 1.0, where 1.0 corresponds to half the sampling frequency, or pi radians.

[H,f1,f2] = freqz2(h,[n2 n1]) returns the same result returned by
[H,f1,f2] = freqz2(h,n1,n2).

[H,f1,f2] = freqz2(h) uses [n2 n1] = [64 64].

[H,f1,f2] = freqz2(h,f1,f2) returns the frequency response for the FIR filter h at frequency values in f1 and f2. These frequency values must be in the range -1.0 to 1.0, where 1.0 corresponds to half the sampling frequency, or pi radians.

[...] = freqz2(h,...,[dx dy]) uses [dx dy] to override the intersample spacing in h. dx determines the spacing for the x dimension and dy determines the spacing for the y dimension. The default spacing is 0.5, which corresponds to a sampling frequency of 2.0.

[...] = freqz2(h,...,dx) uses dx to determine the intersample spacing in both dimensions.

With no output arguments, freqz2(...) produces a mesh plot of the two-dimensional magnitude frequency response.

Class Support

The input matrix h can be of class double or of any integer class. All other inputs to freqz2 must be of class double. All outputs are of class double.

Example

Use the window method to create a 16-by-16 filter, then view its frequency response using freqz2.

See Also

freqz in the Signal Processing Toolbox User's Guide documentation


Previous page  freqspace fsamp2 Next page

© 1994-2005 The MathWorks, Inc.