Introduction - If you have any usage issues, please Google them yourself
A discrete Fourier transform demonstration program in Matlab:
Fs sampling frequency
fft built-in fft function
fftshift built-in function to rearrange the output of fft by moving the zero frequency component to the center of the array