[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.
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 clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
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.