Figure 1. Real and Imag parts (Y label is Frequency)
Code: fs=128; t=-4*pi:1/fs:4*pi; x=1*cos(0.5*t); X=fft(x); N=length(x); n=0:N-1; f=n*fs/N;
Figure 3. code: a=cos(2*pi*t); plot(t,a) A=fft(a); N=length(a); n=0:N-1; f=fs * n/N; phs=angle(fftshift(a));
Figure 4. 1st: Real and Imag parts 2nd: Real with Frequency 3rd: imag with Frequency
Please let me know why Imag part occur in cosine FT.