Short script to showcase each step needed to make the discrete fourier transform in matlab coincide with the analytical result of the fourier transform of a rectangle i.e. a sinc The reasoning behind each step is explained in the script and the result of each step is plotted.
Feel free to ask questions or to give remarks!