How do I plot the spectrum of x_total? X_total = fft(x_total)X_total = fft(x_total)
yields a complex result. I want the x-axis of my spectrum to be in Hertz.
And I want to plot the spectrum of my output signal y_total as well. From the complex envelope, can I say y_total = A_outsin(2pif_ct + (theta+Phi))y_total = A_out*sin(2*pi*f_c*t + (theta+Phi))
?
I just read:
A = abs(X_total) * 2/(f_sT) should yield the amplitude
and f = linspace(0,f_s,length(X_total)) should yield the corresponding
frequency.
Why do I have to normalize the amplitude by 2/(f_sT)A = abs(X_total) * 2/(f_s*T)
should yield the amplitude
and f = linspace(0,f_s,length(X_total))
should yield the corresponding
frequency.
Why do I have to normalize the amplitude by 2/(f_s*T)
? Applying this code yields the spectrum for x_totalx_total
, which I want.
Applying the same for y_totaly_total
does not yield a spectrum at all, when I plot it. Why not?