Need help with Fourier Transform of a function

조회 수: 4 (최근 30일)
Abdelrhman Abdelfatah
Abdelrhman Abdelfatah 2022년 5월 23일
답변: Madhu Varshini 2022년 6월 10일
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개)

Madhu Varshini
Madhu Varshini 2022년 6월 10일
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)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by