Inverse Fourier transform in MATLAB

30 May, 2021
Inverse Fourier Transform helps to return from Frequency domain function X(ω) to Time Domain x(t). In this article, we will see how to find Inverse Fourier Transform in MATLAB.
The mathematical expression for Inverse Fourier transform is:
 
In MATLAB, ifourier command returns the Inverse Fourier transform of given function. Input can be provided to ifourier function using 3 different syntax.
ifourier(X): In this method, X is the frequency domain function whereas by default independent variable is w (If X does not contain w, then ifourier uses the function symvar) and the transformation variable is x.
ifourier(X,transvar): Here, X is the frequency domain function whereas transvar is the transformation variable instead of x.
ifourier(X,indepvar,transvar): In this syntax, X is the frequency domain function whereas indepvar is the independent variable and transvar is the transformation variable instead of w and x respectively.
Example:
 Find the Inverse Fourier Transform of 
Matlab
% MATLAB code specify the variable% w and t as symbolic onessyms w t  % define Frequency domain function X(w)X=exp(-w^2/4);  % ifourier command to transform into% time domain function x(t)% using 1st syntax, where by default % independent variable = w% and transformation variable is x .x1 = ifourier(X);  % using 2nd syntax, where transformation variable = tx2 = ifourier(X,t);  % using 3rd syntax, where independent variable % = w (as there is no other% variable in function) and transformation % variable = t x3 = ifourier(X,w,t);  % Display the output valuedisp('1. Inverse Fourier Transform of exp(-w^2/4) using ifourier(X) :')disp(x1);  disp('2. Inverse Fourier Transform of exp(-w^2/4) using ifourier(X,t) :')disp(x2);  disp('3. Inverse Fourier Transform of exp(-w^2/4) using ifourier(X,w,t) :')disp(x3);
Output:
Example:
 Find the Inverse Fourier Transform of 
Matlab
% MATLAB code to specify the variable %% a w and t as symbolic ones %syms a w t  % define Frequency domain function X(w)X=exp(-w^2-a^2);  % ifourier command to transform into% time domain function x(t)% using 1st syntax, where by default% independent variable = w% and transformation variable is x .x1=ifourier(X);  % using 2nd syntax, where transformation % variable = tx2=ifourier(X,t);  % using 3rd syntax, where independent % variable = w (as there is no other% variable in function) and transformation % variable = t x3=ifourier(X,w,t);  % Display the output valuedisp('1. Inverse Fourier Transform of exp(-w^2-a^2) using ifourier(X) :')disp(x1);  disp('2. Inverse Fourier Transform of exp(-w^2-a^2) using ifourier(X,t) :')disp(x2);  disp('3. Inverse Fourier Transform of exp(-w^2-a^2) using ifourier(X,w,t) :')disp(x3);
Output:
MATLAB-Maths
Picked
MATLAB
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
How to Convert Three Channels of Colored Image into Grayscale Image in MATLAB?
How to Solve Histogram Equalization Numerical Problem in MATLAB?
Adaptive Histogram Equalization in Image Processing Using MATLAB
MRI Image Segmentation in MATLAB
How to detect duplicate values and its indices within an array in MATLAB?
Double Integral in MATLAB
Classes and Object in MATLAB
How to Normalize a Histogram in MATLAB?
How to remove space in a string in MATLAB?
Forward and Inverse Fourier Transform of an Image in MATLAB