MATLAB 中的逆傅里叶变换
逆傅里叶变换有助于从频域函数X(ω) 返回到时域 x(t)。在本文中,我们将看到如何在 MATLAB 中找到逆傅立叶变换。
傅里叶逆变换的数学表达式为:
在 MATLAB 中, ifourier命令返回给定函数的逆傅立叶变换。可以使用 3 种不同的语法为 ifourier函数提供输入。
- ifourier(X):在这种方法中, X是频域函数,而默认情况下自变量是w (如果 X 不包含w,则ifourier使用函数symvar )并且变换变量是x 。
- ifourier(X,transvar):这里, X是频域函数,而transvar是变换变量而不是x 。
- ifourier(X,indepvar,transvar):在这个语法中, X是频域函数,而indepvar是自变量, transvar是变换变量,而不是分别代替w和x 。
例子:
求出的傅立叶逆变换
Matlab
% MATLAB code specify the variable
% w and t as symbolic ones
syms 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 = t
x2 = 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 value
disp('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);
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 = t
x2=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 value
disp('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);
输出:
例子:
求出的傅立叶逆变换
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 = t
x2=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 value
disp('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);
输出: