0
votes

The documentation does specify the use of a lot of arguments but I find it confusing at best. Some of the given syntax are:

pxx = pwelch(x,window,noverlap,nfft)
[pxx,f] = pwelch(x,window,noverlap,f,fs)

where fs is the sampling freq. Welch method (for finding the Power Spectral Density, PSD) divides an input signal of length N into K segments, each of length L and overlap D. It also uses a window. I'd like to know what syntax allows me to specify L, D, window, nfft (if needed), fs (if needed), and get an output like [pxx, f]. It seems this is not possible for some reason.

1

1 Answers

0
votes

You can simply use

[pxx,f] = pwelch(x,window,noverlap,nfft,fs);

where noverlap is what you refer to as D and nfft and fs are optional.
For the window argument you have two options. Either you set window to be the segment length (i.e. L) and then the window used is the default (Hamming I think), or you specify a custom window of length L (the segment length is taken from the window length)