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.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.