Use MATLAB routine sig noise to generate two arrays, one 128 points long and the other 512 points long. Include 2 closely spaced sinusoids having frequencies of 320 and 340-Hz with an SNR of −12 dB. The MATLAB call should be: x=sig_noise([320 340],-12,N); where N=either 128 or 512. Calculate and plot the (unaveraged) power spectrum. How does data length affect the spectra

Respuesta :

yemmy

Answer and Explanation:

Given that

X = sig_noise( [f₁ f₂],SNR,N)

where f₁ = 300 Hz and f₂ = 340 Hz

SNR = -12 db

N = 128 or 512

hence, we have,

X = sig_noise([320 340] -12.128)

or

X = sig_noise([320 340] -12.512)

in this question, we assume our [tex]f_{s}[/tex] to be 1 kHz

y = fft(x)

power spectrum (PS)

(PS) =abs (y).^2

[tex]Freq = (1:N)/f_{s}[/tex]

plot(freq, 20*log10(ps),'k');

attached below is a sample waveform to expect

Ver imagen yemmy
ACCESS MORE
EDU ACCESS