function [P,F]=pspect(s,Fs,Nfft,Nwin) % compute power spectrum from signal %USAGE [P,F]=pspect(s,Nfft,Nwin) % s=input signal % Fs=sampling frequency % Nfft=FFT length. Should be greater than or equal to Nwin % Nwin=window length. % P=power spectrum estimate % F=frequency axis for spectrum plotting % Estimate is obtained by averaging periodograms of windows that overlap % by 50%. if Nfft