%% Create Matrix of Desired Passband Response Using Frequency Vectors
% 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)

% Copyright 2020 The MathWorks, Inc.