What is the correct way of using pwelch ?

5 Ansichten (letzte 30 Tage)
Shirin patil
Shirin patil am 11 Dez. 2017
Bearbeitet: the cyclist am 11 Dez. 2017
I have array 'x' of 5000 real valued data over which i have to use 'pwelch'. I am doing it in the following two ways.
First way is:
Fs = 8000;
noverlap = 125;
window = 250;
nfft1 = 250;
[psL fpwelch] = pwelch(x,hamming(window),noverlap,nfft1,Fs);
second way is:
Fs = 8000;
noverlap = 125;
window = 250;
nfft2 = 500;
[psL fpwelch] = pwelch(x,hamming(window),noverlap,nfft2,Fs);
The only differnce is that nfft2 > nfft1. The graph is smooth enough without any noise when i use second way which is my requirement as well. First way is correct, i have no doubt in that.
Is second way is also correct ?

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by