title: Inverse Fourier Transform function gives wrong result
body: <p>I am implementing a code for image enhancement and to apply Fourier and inverse Fourier transform I am using the code below but in result it gives black image. </p>
  
  <pre><code>F = fft2(image); F = fftshift(F); % Center FFT
  F = abs(F); % Get the magnitude
  F = log(F+1); % Use log, for perceptual scaling, and +1 since log(0) is undefined
  F = mat2gray(F); % Use mat2gray to scale the image between 0 and 1
  Y = ifft2(F);
  subplot(1,1,1);
  imshow(Y,[]); % Display the result
  </code></pre>