This is what I have done so far(adsbygoogle = window.adsbygoogle || []).push({});

Here is the the formula for the Fourier transform. I expect to get a sinc function, which I am but it doesn't match it by scale.Code (Text):

t = -5:.01:4.99; // this give us our rect function from -.5 to .5

x = abs(t) <= .5;

subplot(2,1,1) // creates a subplot for the rect function

plot(t,x)

axis([-2 2 -1 2]) // sets the axis

T_s = .001; // The calculation of the discrete Fourier Transform

F_s = 1./T_s;

N = 1000;

n = -N/2.:1.:(N/2.)-1;

f = -F_s/2.:1.:(F_s/2.)-1;

X_f = T_s*x*exp(-1i*2*pi*f'*n*T_s);

z = fft(X_f);

subplot(2,1,2)

plot(abs(X_f))

[PLAIN]http://img580.imageshack.us/img580/1699/fourier.jpg [Broken]

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Discrete Fourier Transforms without using FFT function

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for Discrete Fourier Transforms |
---|

Mathematica How to add legends with 6 or more discrete entries? |

MATLAB Plotting Coordinate Transformations in Matlab |

Using Maxima to plot error in Fourier series |

**Physics Forums | Science Articles, Homework Help, Discussion**