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.

How to use the hamming window function in Matlab and plot the spectrum afterwards?

Status
Not open for further replies.

naisare

Member level 2
Member level 2
Joined
Oct 18, 2004
Messages
43
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
391
Hi all,

I am trying to do the fft on the digital output of SD modulator in matlab.
can anyone tell me how to use the window function in matlab(hamming window) and how to plot the spectrum after this.
I am new to matlab programing.

Thanks a lot
 

matlab fft window

Wham(n)=0.54-0.46 cos((2πn)/(N-1)) , 0≤n≤N-1

hamming: Hamming window
--------------------------------

w = hamming(L)
w = hamming(L,'sflag')

Description
---------------
w = hamming(L) returns an L-point symmetric Hamming window in the column vector w. L should be a positive integer. The coefficients of a Hamming window are computed from the following equation.

The window length is L=N+1

w = hamming(L,'sflag') returns an L-point Hamming window using the window sampling specified by 'sflag', which can be either 'periodic' or 'symmetric' (the default). The 'periodic' flag is useful for DFT/FFT purposes, such as in spectral analysis. The DFT/FFT contains an implicit periodic extension and the periodic flag enables a signal windowed with a periodic window to have perfect periodic extension. When 'periodic' is specified, hamming computes a length L+1 window and returns the first L points. When using windows for filter design, the 'symmetric' flag should be used.

Examples

Create a 64-point Hamming window and display the result in WVTool:

L=64;
wvtool(hamming(L))

all the above from matlab help/please refere to matlab help and you will see more.
 

matlab wham

hi dear, is that enough or you need more?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top