File:KaiserWindow.svg

Uploaded by Bob K
Upload date 2019-03-24T16:58:13Z
MIME type image/svg+xml
Dimensions 700 × 525 px
File size 78.4 KB

Summary

Description Kaiser Window Function for different parametric values
Date 2007-09-18, revised 21 March 2019 by Bob K
Source Own work
Author RetoGalli
SVG development
InfoField
 The SVG code is valid.
V
 This vector image was created with GNU Octave.

Licensing

Public domain This work has been released into the public domain by its author, RetoGalli. This applies worldwide.
In some countries this may not be legally possible; if so:
RetoGalli grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Source code

This graphic was created by the following Octave script:

pkg load signal
graphics_toolkit gnuplot

clear all; close all; clc
betas = [1 2 4 8 16];
alphas = betas/pi
colors = [0 0 1; 0 1 0; 1 0 0; 0 1 1; 1 0 1]; %blue green red cyan magenta

hfig = figure;
grid on; hold on; box on
N = 128;	% Relative curve shapes are not sensitive to this number
set(gca, "XTick",[0 : 1/8 : 1]*N,...
         "XTickLabel",[" 0"; " "; " "; " "; " "; " "; " "; " "; "N  "])
xlim([0 N])
ylim([0 1.05])

for k = 1:length(betas)
  w = besseli(0,betas(k)*sqrt(1-(2*(0:N)/N -1).^2))/besseli(0,betas(k));
  plot(0:N, w, "color", colors(k,:), "linewidth", 2)
end

title("Parametric family of Kaiser windows")
ylabel(" ")             % create left margin
text(3, .99, 'W_n', "fontsize", 14)
text(56, -0.05, '\leftarrow   n   \rightarrow')

h = legend(['\pi\alpha=  ' num2str(betas(1),'%2i') '; \alpha=' num2str(betas(1)/pi,'%4.2f')],...
           ['\pi\alpha=  ' num2str(betas(2),'%2i') '; \alpha=' num2str(betas(2)/pi,'%4.2f')],...
           ['\pi\alpha=  ' num2str(betas(3),'%2i') '; \alpha=' num2str(betas(3)/pi,'%4.2f')],...
           ['\pi\alpha=  ' num2str(betas(4),'%2i') '; \alpha=' num2str(betas(4)/pi,'%4.2f')],...
           ['\pi\alpha='   num2str(betas(5),'%2i') '; \alpha=' num2str(betas(5)/pi,'%4.2f')],...
           "location","south");
legend boxoff
set(h, "fontsize",10);

% The following print() converts plain-text Greek characters in text() strings into Symbol font,
% but legend() crashes it.  The set() succeeds, but generates warnings, some of which are 
% diabled by warning().
% print(hfig,"-dsvg","-color",'C:\Users\BobK\KaiserWindow.svg')
  warning("off", "Octave:missing-glyph");
  set(h, "fontname","Symbol");

Captions

Kaiser Window Function for different parametric values

Items portrayed in this file

depicts

Category:Created with GNU Octave Category:Images with Gnuplot source code Category:Images with Octave source code Category:PD-self Category:Self-published work Category:Signal processing Category:Valid SVG created with Octave