I am experimenting with digital signal processing and I took the FFT of a sinusoid in Matlab. I got the frequency components that I expected to be present but there are two excess spikes that mirror them. Are these reflections of the negative frequencies present in a sinusoidal spectrum that I didn't account for in my code or are they present in the signal?
Code:
Fs = 1e9; % Sampling frequency
T = 1/Fs; % Sampling period
L = 1500; % Length of signal
t = (0:L-1)*T; % Time vector
S = cos(2*pi*200e6*t) + cos(2*pi*400e6*t);
Y = fft(S);
plot(Fs/L*(0:L-1),abs(Y),"LineWidth",3)
title("Magnitude of fft Spectrum")
xlabel("(Hz)")
ylabel("|fft(signal)|")
Result: