Need help with Fourier Transform of a function

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Madhu Varshini
Madhu Varshini il 10 Giu 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)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by