Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How to Spectrum Estimate using Welch with Overlap?

Status
Not open for further replies.

asustant

Newbie level 2
Joined
May 15, 2016
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
11
Hi all. I'm doing some spectrum estimation. Here are codes, I used Welch method (without using pwelch func.) with no overlap. Now I want to do it with %50 overlap to see the difference, which parts should I change for this purpose?

Code:
 Fs = 8000; 
 x  = y1;         %80x1 matrix
 Nx = length(x);

 w = hann(Nx);
 xw = x.*w; 

 nfft = Nx; 
 X = fft(xw,nfft);
 mx = abs(X).^2; 

 mx = mx/(w'*w); 
 NumUniquePts = nfft/2+1; 
 mx = mx(1:NumUniquePts);
 mx(2:end-1) = mx(2:end-1)*2;

 Pxx1 = mx/Fs;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top