The reason window plotter came up, was because you used the window gate way function as an input argument to the call: [pxx, f] = periodogram(y_soundsource_data,window, nfft, Fs).
Deconstructing the [pxx, f]= periodogram(y_soundsource_data, window, nfft, Fs);
- You can get y_soundsource_data and Fs<-- sampling frequency, from the audioread function. file[y Fs]= audioread('100-daddy1.wav');
- window and nfft are not understood by the periodogram function UNLESS you define them.
- y_soundsource_data and Fs are understood, because audioread returns the data metrics.
- nfft - refers to the number of points used in the DFT. A larger nfft value will lead to a better estimation. nfft MUST be an integer. You can't have half a point.
- window = vector of the size of the y_soundsource_data. 1:length_y_soundsource_data
- both window and nfft need to be defined before you call the periodogram function.