Need help with Fourier Transform of a function
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Abdelrhman Abdelfatah
el 23 de Mayo de 2022
Respondida: Madhu Varshini
el 10 de Jun. de 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
Respuestas (1)
Madhu Varshini
el 10 de Jun. de 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)
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!