Firstly, there is no such team, which is called ifftshow. Secondly, you are not filtering anything. All you do is visualize the spectrum of the image.
, , . -, , . , , . , , .
abs. , imshow , , . , , .
. , :
im = imread('cameraman.tif');
figure;
imshow(im);

, - fftshift. double, . , , abs, :
fftim = fftshift(fft2(double(im)));
mag = abs(fftim);
figure;
imshow(mag, []);

, , . log . , , . , 1 , , . , , , log:
figure;
imshow(log(1 + mag), []);

. . . meshgrid . -1, :
[x y]=meshgrid(-floor(w/2):floor(w/2)-1,-floor(h/2):floor(h/2)-1);
, , , . , , . , . :

D(u,v) - , Do - , B - , , . n - . Do d = 50. B = sqrt(2) - 1 , Do, D(u,v) = 1 / sqrt(2) = 0.707, 3 , . , B 1, B = sqrt(2) - 1.
. , . . , fftshift, , , . , uint8, , .
:
%// Your code with meshgrid fix
n=1;
d=50;
h=size(im,1);
w=size(im,2);
fftim = fftshift(fft2(double(im)));
[x y]=meshgrid(-floor(w/2):floor(w/2)-1,-floor(h/2):floor(h/2)-1);
%hhp=(1./(d./(x.^2+y.^2).^0.5).^(2*n));
%%%%%%// New code
B = sqrt(2) - 1; %// Define B
D = sqrt(x.^2 + y.^2); %// Define distance to centre
hhp = 1 ./ (1 + B * ((d ./ D).^(2 * n)));
out_spec_centre = fftim .* hhp;
%// Uncentre spectrum
out_spec = ifftshift(out_spec_centre);
%// Inverse FFT, get real components, and cast
out = uint8(real(ifft2(out_spec)));
%// Show image
imshow(out);
, , :
figure;
imshow(log(1 + abs(out_spec_centre)), []);
:

. , . , .
out , :

! uint8 0 , 255-255. , , ... , [0,1], uint8 255. , , , .... - :
%// Your code with meshgrid fix
n=1;
d=50;
h=size(im,1);
w=size(im,2);
fftim = fftshift(fft2(double(im)));
[x y]=meshgrid(-floor(w/2):floor(w/2)-1,-floor(h/2):floor(h/2)-1);
%hhp=(1./(d./(x.^2+y.^2).^0.5).^(2*n));
%%%%%%// New code
B = sqrt(2) - 1; %// Define B
D = sqrt(x.^2 + y.^2); %// Define distance to centre
hhp = 1 ./ (1 + B * ((d ./ D).^(2 * n)));
out_spec_centre = fftim .* hhp;
%// Uncentre spectrum
out_spec = ifftshift(out_spec_centre);
%// Inverse FFT, get real components
out = real(ifft2(out_spec));
%// Normalize and cast
out = (out - min(out(:))) / (max(out(:)) - min(out(:)));
out = uint8(255*out);
%// Show image
imshow(out);
:
