Transformada de Fourier en MATLAB

La transformada de Fourier es una técnica matemática que ayuda a transformar la función del dominio del tiempo x(t) en la función del dominio de la frecuencia X(ω). En este artículo, veremos cómo encontrar la transformada de Fourier en MATLAB.

La expresión matemática de la transformada de Fourier es:X(ω) = F\{x(t)\} = ∫_{-∞}^∞x(t).e^{(-jωt)} dt

Usando la función anterior, se puede generar una Transformada de Fourier de cualquier expresión. En MATLAB, el comando de Fourier devuelve la transformada de Fourier de una función determinada. La entrada se puede proporcionar a la función de Fourier usando 3 sintaxis diferentes.

  • Fourier(x): en este método, x es la función en el dominio del tiempo, mientras que la variable independiente está determinada por symvar y la variable de transformación es w por defecto.
  • Fourier(x,transvar): aquí, x es la función en el dominio del tiempo, mientras que transvar es la variable de transformación en lugar de w.
  • Fourier(x,indepvar,transvar): en esta sintaxis, x es la función en el dominio del tiempo, mientras que indepvar es la variable independiente y transvar es la variable de transformación en lugar de symvar y w respectivamente.

Ahora encontramos la transformada de Fourier de   e^{-t^2}.

Ejemplo 1:

Matlab

% MATLAB code to specify the variable t 
% and u as symbolic ones The syms function
% creates a variable dynamically and 
% automatically assigns to a MATLAB variable
% with the same name
syms t u
  
% define time domain function x(t)
x = exp(-t^2-u^2);
  
% fourier command to transform into 
% frequency domain function X(w)
  
% using 1st syntax, where independent variable
% is determined by symvar (u in this case)
% and transformation variable is w by default.
X = fourier(x);
  
% using 2nd syntax, where transformation 
% variable = y
X1=fourier(x,y);
  
% using 3rd syntax, where independent 
% variable = t & transformation variable = y 
X2=fourier(x,t,y);
  
% Display the output value
disp('1. Fourier Transform of exp(-t^2-u^2) using fourier(x) :')
disp(X);
  
disp('2. Fourier Transform of exp(-t^2-u^2) using fourier(x,y) :')
disp(X1);
  
disp('3. Fourier Transform of exp(-t^2-u^2) using fourier(x,t,y) :')
disp(X2);

Producción: 

Tomemos otro ejemplo para encontrar la Transformada de Fourier de a*abs(t).

Ejemplo 2:

Matlab

% MATLAB code for specify the variable
% a and t as symbolic ones
syms a t
  
% define time domain function x(t) 
% where t=independent variable & a=constant
x = a*abs(t);
  
% fourier command to transform into frequency
% domain function X(w)
% using 1st syntax
X = fourier(x);
  
% using 2nd syntax, where transformation 
% variable = y
X1 = fourier(x,y);
  
% using 3rd syntax, where transformation variable
% = y & independent
% variable = t (as t is the only other variable)
X2 = fourier(x,t,y);
  
% Display the output value
disp('1. Fourier Transform of a*abs(t) using fourier(x):')
disp(X);
  
disp('2. Fourier Transform of a*abs(t) using fourier(x,y):')
disp(X1);
  
disp('3. Fourier Transform of a*abs(t) using fourier(x,t,y):')
disp(X2);

Producción: 

 

Publicación traducida automáticamente

Artículo escrito por jatan_18 y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *