Need help with Fourier Transform of a function

1 vue (au cours des 30 derniers jours)
Abdelrhman Abdelfatah
Abdelrhman Abdelfatah le 23 Mai 2022
Hello, I need to get fourier transorm of a function y(t) which is a byproduct of x(t) and some trig function.
my issue is that i don't know x(t), but i know x(wj) function .... so i need to plot y(t).. then y(jw) .. and here is what i have done so far
t=-1:0.001:1;
% Function I want to plot y(t) = x(t) [cos(t/2) + cos(3t/2)]
x_w=- abs(t)+1; %given function as X(wj)
x_t=ifft(x_w); % I try to get x(t) out of the given x(wj)
% I want also to plot y(wj)
Thank you in advance
  1 commentaire
Abdelrhman Abdelfatah
Abdelrhman Abdelfatah le 24 Mai 2022
I edited the question as It was not as clear.

Connectez-vous pour commenter.

Réponses (1)

Madhu Varshini
Madhu Varshini le 10 Juin 2022
For this case, it is not necessary to get x(t).
If y(t) = x(t) .[cos(t/2) + cos(3t/2)]
and if x(jw) is known , then using convolution , we can get Y(jw) directly.
And then using Inverse Fourier transform ,Y(t) can be derived.
Below is the code snippet:
t=-1:0.001:1;
x_w = - abs(t)+1;
% y_t = x_t [cos(t/2) + cos(3t/2)]
% Let z_t = cos(t/2) + cos(3t/2)
z_t= (cos(t./2) + cos(3*t./2))
z_w = fft(z_t)
% y_t = x_t * z_t
% y_w will be convolution of x_w and y_w
y_w = conv(x_w,z_w)
% y_t will be the inverse Fourier Transform of y_w
y_t = ifft(y_w)
% plot Y(jw) function
figure(1)
plot(y_w)
%plot Y(t) function
figure(2)
plot(y_t)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by