 -- Function File: [Pxx, W] = periodogram (X)
     For a data matrix X from a sample of size N, return the periodogram.  The angular frequency is returned in W.

     [Pxx,w] = periodogram (X).

     [Pxx,w] = periodogram (X,win).

     [Pxx,w] = periodogram (X,win,nfft).

     [Pxx,f] = periodogram (X,win,nfft,Fs).

     [Pxx,f] = periodogram (X,win,nfft,Fs,"range").

       * x: data; if real-valued a one-sided spectrum is estimated, if complex-valued or range indicates "twosided", the full spectrum is estimated.

       * win: weight data with window, x.*win is used for further computation, if window is empty, a rectangular window is used.

       * nfft: number of frequency bins, default max (256, 2.^ceil (log2 (length (x)))).

       * Fs: sampling rate, default 1.

       * range: "onesided" computes spectrum from [0..nfft/2+1]. "twosided" computes spectrum from [0..nfft-1].  These strings can appear at any position in the list input arguments after window.

       * Pxx: one-, or two-sided power spectrum.

       * w: angular frequency [0..2*pi) (two-sided) or [0..pi] one-sided.

       * f: frequency [0..Fs) (two-sided) or [0..Fs/2] one-sided.