fs = 50000;
sigDuration = 5;
time = 0:1/fs:sigDuration;
Nfft = 1024;
sig = rand(1,length(time));
window = hamming(Nfft);
tic
Pxx = pwelch(sig,[],512,1024,fs);
et = toc
factor = sigDuration/et

