I'm attempting to use Matlab fft functionality to reconstruct fourier transform tables in my textbook (brigham), but to little success.(adsbygoogle = window.adsbygoogle || []).push({});

Here is code to take the fourier transform of [tex]cos(2*\pi*x*f_0)[/tex], which should be [tex]\frac{\delta (f + f_0) + \delta (f - f_0)}{2}[/tex]

I can *almost* get it, but not quite. See spikes at +/- .001, when should be at +/- .1 Any help would be appreciated.

Using [tex]H \left( \frac{n}{NT} \right) = \sum_{k=0}^{N-1} h(kT) e^{-i2\pi n k / N} [/tex] for n = 0, ..., N - 1.Code (Text):

x = 0:.1:9.9;

%N=100, T=10

y = cos(x*2*pi/10);

Y = fft(y);

X = (0:99)/1000 - 50/1000;

Y = fftshift(Y);

plot(X,real(Y));

**Physics Forums - The Fusion of Science and Community**

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!

# FFT in Matlab

Loading...

Similar Threads - Matlab | Date |
---|---|

Matlab Coding angular spectrum of waves in a fluid | Today at 7:30 AM |

How to program this in Matlab | Feb 28, 2018 |

Matlab Making a short test for self-adjointness | Feb 23, 2018 |

Matlab Plotting Coordinate Transformations in Matlab | Feb 12, 2018 |

**Physics Forums - The Fusion of Science and Community**