File:Two 8-point Gaussian window functions.svg
Original file (SVG file, nominally 652 × 372 pixels, file size: 36 KB)
Captions
Summary[edit]
DescriptionTwo 8-point Gaussian window functions.svg |
English: Two different ways to generate Gaussian window functions (σ=0.4) 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 | Derivative works of this file: Comparison of symmetric and periodic Gaussian windows.svg | |||
SVG development InfoField | This W3C-invalid vector image was created with GNU Octave. |
|||
Gnu Octave source InfoField | click to expand
This graphic was created by the following Octave script: pkg load signal
graphics_toolkit gnuplot
clear all; close all; clc
function out=gauss(sigma,M)
out=exp(-.5*(((0:M)-M/2)/(sigma*M/2)).^2);
endfunction
M=5600; % big number, divisible by 7 and 8
window = gauss(0.4,M); % M+1 samples of a Gaussian window
N=8; % actual window size, in "hops"
% Sample the window.
% Scale the abscissa. 0:M samples --> 0:7 "hops", and take 8 symmetrical hops, from 0 to 7
sam_per_hop_7 = M/7;
%symmetric8 = window(1+(0:7)*sam_per_hop_7);
symmetric8 = exp(-.5*(((0:7)-7/2)/(.4*7/2)).^2); % Equivalent method
% Scale the abscissa. 0:M samples --> 0:8 "hops", and take 8 asymmetrical hops, from 0 to 7
sam_per_hop_8 = M/8;
%periodic8 = window(1+(0:7)*sam_per_hop_8);
periodic8 = exp(-.5*(((0:7)-8/2)/(.4*8/2)).^2); % Equivalent method
% Compare equivalent noise bandwidths (info only)
ENBW_symmetric8 = N*sum(symmetric8.^2)/sum(symmetric8)^2 % 1.6233
ENBW_periodic8 = N*sum(periodic8.^2) /sum(periodic8)^2 % 1.4533
%------------------------------------------------------------------
% Plot the points
figure("position", [100 200 700 400])
plot(0:7, symmetric8, "color","red", ".", "markersize",14)
hold on
plot(0:7, periodic8, "color","blue", ".", "markersize",14)
% Connect the dots
hops = (0:M)/sam_per_hop_8;
plot(hops, window, "color","blue") % periodic
hops = (0:M)/sam_per_hop_7;
plot(hops, window, "color","red") % symmetric
xlim([0 8])
set(gca, "xgrid","on")
set(gca, "ygrid","on")
set(gca, "ytick",[0:.25:1])
set(gca, "xtick",[0:8])
title("Two 8-point Gaussian window functions", "fontsize",14, "fontweight","normal");
xlabel('\leftarrow n \rightarrow', "fontsize",14)
text(2.96, .56, 'Matlab "symmetric" \rightarrow', 'color', 'red', 'FontSize',12)
str = {'\leftarrow Matlab "periodic"',' ("DFT-even")'};
text(5.1, .813, str, 'color', 'blue', 'FontSize',12)
#{
% After this call, the cursor units change to a normalized ([0,1]) coordinate system
% Draw an annotated right-to-left arrow.
annotation("textarrow", [.683 .644], [.738 .738],...
"color", "blue", "string", {'Matlab "periodic"',' ("DFT-even")'}, "fontsize",10,...
"linewidth",1, "headstyle","vback1", "headlength",5, "headwidth",5)
% Draw an annotated left-to-right arrow.
% Bug alert: Unlike the right-to-left arrow, it centers the text at the arrow start point.
% So the string of blanks in the 1st continuation line is a work-around for that.
annotation("textarrow", [.565 .62], [.542 .542],...
"color", "red", "string", {'Matlab "symmetric" '}, "fontsize",10,...
"linewidth",1, "headstyle","vback1", "headlength",5, "headwidth",5)
#}
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 01:42, 29 September 2019 | 652 × 372 (36 KB) | Bob K (talk | contribs) | increase size of annotation font | |
00:39, 29 September 2019 | 652 × 372 (36 KB) | Bob K (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
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 | 184.15mm |
---|---|
Height | 104.9mm |