The fft function in MATLAB computes something called the discrete Fourier transform. Your problem here is asking you to find something that I would call the continuous-time Fourier transform. The two things are related but are not the same, and I do not think that any output from fft would be considered a satisfactory solution to the problem.
The functions
and
are functions that have continuous-time Fourier transforms with relatively simple, mathematical forms. You can look up the Fourier transforms of the sinc and cos functions in a textbook. Then, apply Fourier transform properties (time scaling, multiplication of two signals) to figure out the equations for the Fourier transforms of
and
. These Fourier transforms can then be plotted accurately by hand.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473538/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473543/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473548/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473553/image.png)