File:8-point Hann windows.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 700 × 525 pixels. Other resolutions: 320 × 240 pixels | 640 × 480 pixels | 1,024 × 768 pixels | 1,280 × 960 pixels | 2,560 × 1,920 pixels.
Original file (SVG file, nominally 700 × 525 pixels, file size: 296 KB)
File information
Structured data
Captions
Summary
[edit]Description8-point Hann windows.svg |
English: We illustrate two different ways to generate Hann window functions for spectral analysis applications. MATLAB calls them "symmetric" and "periodic". The latter is also called "DFT Even" in the classic Frederic Harris paper. |
|||
Date | ||||
Source | Own work | |||
Author | Bob K | |||
Permission (Reusing this file) |
I, the copyright holder of this work, hereby publish it under the following license:
|
|||
Other versions |
This file was derived from: 8-point Hann windows.png |
|||
SVG development InfoField | V This vector image was created with GNU Octave. |
|||
Octave/Gnuplot source InfoField | click to expand
pkg load signal
graphics_toolkit gnuplot
L=5600;
window = hann(L);
N=8; % window size, in samples
warning("off")
dx = (L-1)/(N-1); % decimation factor for 7 hops (8 samples)
symmetric = window(1+(0:7)*dx); % take 8 of 8 symmetrical samples
dx = (L-1)/N; % decimation factor for 8 hops (9 samples)
periodic = window(1+(0:7)*dx); % take 8 of 9 symmetrical samples
%Replace above with the equivalent formulaic versions
%This step just proves that formulas match window() array.
symmetric = .5*(1-cos(2*pi*(0:N-1)/(N-1)));
periodic = .5*(1-cos(2*pi*(0:N-1)/N)); % aka "DFT Even"
%Compare equivalent noise bandwidths (info only)
ENBW_symmetric = N*sum(symmetric.^2)/sum(symmetric)^2
ENBW_periodic = N*sum(periodic.^2) /sum(periodic)^2
%Plot the coefficients as dots
hfig=figure
plot(0:7, symmetric, 'color', 'red', '.', 'MarkerSize', 10)
box off % no border around plot
hold on % same axes for next 3 plots
plot(0:7, periodic, 'color', 'blue', '.', 'MarkerSize', 10)
%Connect the dots
x = (0:L-1)*N/L;
plot(x, window, 'color', 'blue') % periodic
x = (0:L-1)*(N-1)/L;
plot(x, window, 'color', 'red') % symmetric
xlim([0 8])
set(gca,'FontSize',14)
set(gca, "yaxislocation", "origin")
set(gca, 'xgrid', 'on');
set(gca, 'ygrid', 'on');
set(gca, 'ytick', [0:.25:1]);
set(gca, 'xtick', [0:8]);
text(3.3, 0.27, 'Matlab "symmetric" \rightarrow', 'color', 'red', 'FontSize',12)
str = {'\leftarrow Matlab "periodic"',' ("DFT-even")'};
text(5.5, 0.74, str, 'color', 'blue', 'FontSize',12)
title('Two 8-point Hann window functions', 'FontSize',12);
xlabel('\leftarrow n \rightarrow')
% I actually used the export function on the GNUPlot figure toolbar.
print(hfig,"-dsvg", "-S620,392","-color", 'C:\Users\BobK\8-point Hann windows.svg')
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 13:02, 10 August 2019 | 700 × 525 (296 KB) | Bob K (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following 5 pages use this file:
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 560pt |
---|---|
Height | 420pt |