Matlab code for 2D inverse Fourier transforms

In summary, the conversation discusses the writer's routines for computing the 2D inverse Fourier transform and their willingness to share the code with others. The conversation also touches on the limitations of built-in functions for Fourier transforms in Matlab and the writer's preference for calculating the Hilbert transform themselves.
  • #1
hunt_mat
Homework Helper
1,782
32
I have written some routines that compute the 2D inverse Fourier transform, if anyone thinks that this may be useful at all then please let me know and I will gladly post the code.
 
Physics news on Phys.org
  • #2
What's wrong with the built in functions fft2 and ifft2?
 
  • #3
They're not Fourier transforms? Even with the single variable fft doesn't do a Fourier transforms, a single variable Fourier transform takes a function and gives a function evaluated at a single point k, but the function fft doesn't do this and from the description of the actual function you can't really figure out how to get the actual function evaluated at a point k (which is a single number NOT a vector.

Just because Matlab has certain inbuilt functionality doesn't mean to say that it's good. It also has a Hilbert transform, I always calculate that myself as well.
 

1. What is a 2D inverse Fourier transform in Matlab?

A 2D inverse Fourier transform in Matlab is a mathematical operation that converts a signal from the frequency domain to the spatial domain. It is used to analyze and manipulate digital images and signals.

2. How do you write a Matlab code for a 2D inverse Fourier transform?

To write a Matlab code for a 2D inverse Fourier transform, you first need to define the input signal in the frequency domain using the fft2 function. Then, use the ifft2 function to perform the inverse Fourier transform and obtain the signal in the spatial domain.

3. What is the syntax for the fft2 function in Matlab?

The syntax for the fft2 function in Matlab is Y = fft2(X), where X is the input signal and Y is the transformed signal in the frequency domain.

4. How can I visualize the results of a 2D inverse Fourier transform in Matlab?

You can visualize the results of a 2D inverse Fourier transform in Matlab by using the imshow function to display the transformed signal in the spatial domain. Additionally, you can use the abs function to obtain the magnitude of the transformed signal and use the angle function to obtain the phase information.

5. Can I perform a 2D inverse Fourier transform on a color image in Matlab?

Yes, you can perform a 2D inverse Fourier transform on a color image in Matlab by separately transforming each color channel (red, green, and blue) and then combining the results to obtain the transformed image in the spatial domain.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
745
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
859
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top