Generate the signal shown in Problem 2 and use MATLAB to find both the magnitude and phase spectrum of this signal. Assume that the period, $T$, is $1 \mathrm{sec}$ and assume a sampling frequency of $500-\mathrm{Hz}$; hence you will need to use 500 points to generate the signal. Plot the time domain signal, $x(t)$, then calculate and plot the spectrum. The spectrum of this curve falls off rapidly, so plot only the first 20 points plus the DC term and plot them as discrete points, not as a line plot. Note that every other frequency point is zero, as predicted by the symmetry of this signal.