[f1,f2] = freqspace(n)
returns the two-dimensional frequency vectors f1 and
f2 for an n-by-n matrix.

freqspace returns the implied frequency range for equally spaced
frequency responses. freqspace is useful when creating desired frequency
responses for various one- and two-dimensional applications.

[f1,f2] = freqspace([m n])
returns the two-dimensional frequency vectors f1 and
f2 for an m-by-n matrix.

[x,y] = freqspace(___,'meshgrid')
is equivalent to

Create a matrix Hd that contains the desired bandpass response for an approximately symmetric, two-dimensional bandpass filter with passband between 0.1 and 0.5 (normalized frequency, where 1.0 corresponds to half the sampling frequency, or π radians.) Use freqspace to create the frequency vectors f1 and f2.

[f1,f2] = freqspace(21,'meshgrid');
Hd = ones(21);
r = sqrt(f1.^2 + f2.^2);
Hd((r<0.1)|(r>0.5)) = 0;
colormap(jet(64))
mesh(f1,f2,Hd)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.