itmr
Member level 3
hi everybody
i need to calculate and plot fourier transform to the func
x1_t = [sin(2*50*t.*pi)]./ (2*50*t.*pi);
i coded the transform like this and getting nothing at the plot
omega = [-2*pi*500 : pi : 2*pi*500];
X1_w = zeros(size(omega)); % decleration of the transform results
for i = 1 : length(omega)
X1_w(i) = trapz(t,x1_t.*exp(-j*omega(i)*t)); %Fourier Transform
end
X1_w_magnitude = abs(X1_w); %Magnitude of the Fourier Transform
figure (4)
plot(omega,X1_w_magnitude,'LineWidth',2);
could someone have any idea that can help me??
i need to calculate and plot fourier transform to the func
x1_t = [sin(2*50*t.*pi)]./ (2*50*t.*pi);
i coded the transform like this and getting nothing at the plot
omega = [-2*pi*500 : pi : 2*pi*500];
X1_w = zeros(size(omega)); % decleration of the transform results
for i = 1 : length(omega)
X1_w(i) = trapz(t,x1_t.*exp(-j*omega(i)*t)); %Fourier Transform
end
X1_w_magnitude = abs(X1_w); %Magnitude of the Fourier Transform
figure (4)
plot(omega,X1_w_magnitude,'LineWidth',2);
could someone have any idea that can help me??