1
$\begingroup$

Trying to write a program that plots these graphs The image was from a question I posted on reddit, so ignore the title.

I'm trying to write a program that plots these graphs

  • I know that the first plot is just a plot of the source-signal so the "time" domain of the voice signal. I have that down.
  • the 2nd plot is the frequency domain signal, which I should be able to get with fft() fcn in matlab? but the plot it gave doesn't look right. weird fft plot of source signal - me - a female just saying "aaaaahhhh" for about 15 seconds.

weird fft plot of source signal - me - a female just saying "aaaaahhhh" for about 15 seconds

And after I get the right filter function, I do conv??

Thanks in advance.

$\endgroup$
  • $\begingroup$ You need to take the magnitude of the spectrum 'abs(fft(x))' before plotting. $\endgroup$ – Harris Mar 28 at 22:30
  • $\begingroup$ @Harris noted. - thanks $\endgroup$ – ThermoRestart Mar 29 at 17:28
0
$\begingroup$

What u plotted is the complex fft samples. In order to see the psd in matlab use plot([-1/2:1/ffteln:1/2-1/fftlen]*fs, 10*log10( abs( fftout)./length(fftout)).^2)). I am assuming of coarse that your signal is real and therefore plotting from -fs/2:fs/2 is standard practice. For complex signals usually you want to plot from 0:Fs because nyquist is Fs for complex.

$\endgroup$
  • $\begingroup$ Thanks for your response to my question! I was told that the 3rd figure plot is a plot of the spectral density, and that periodogram(y_source) will gives the plot of the output spectrum density. $\endgroup$ – ThermoRestart Mar 29 at 17:28
0
$\begingroup$

The output plot is a plot of the power spectural density. Matlab has built in functions that run estimates of this. psd has deprecated, however, periodogram(sourcesignal) will give the output spectrum density plot, bypassing the need to create a filter function signal for modulation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.