File:Kbd-window.svg

Summary

Description
English: Kaiser-Bessel derived (KBD) window
Date
Source Own work
Author RetoGalli
SVG development
InfoField

Licensing

RetoGalli, the copyright holder of this work, hereby publishes it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Kbd-window.svgCategory:Self-published work

Source code

This graphic was created by the following Octave script:

pkg load signal
graphics_toolkit gnuplot
clear all; close all; clc
betas = [2 8 24 100];
alphas = betas/pi
colors = [0 0 1; 0 1 0; 0 1 1; 1 0 1]; %blue green 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]*2*N,...
         "XTickLabel",[" 0"; " "; " "; " "; " "; " "; " "; " "; "2N-1 "])
set(gca, "YTick",[0 0.2 0.4 0.6 0.707 0.8 1.0] )
xlim([0 2*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));

    d = zeros(1,2*N);	% length 2N
    for n=0:N-1
    d(1+n) = sum(w(1+(0:n)));
    end

    for n=N:2*N-1
    d(1+n) = sum(w(1+(0:2*N-1-n)));
    end

    d = sqrt(d/sum(w(1+(0:N))));
    plot(0:2*N-1, d, "color", colors(k,:), "linewidth", 2)
end

title("Kaiser-Bessel-derived window functions")
ylabel(" ")             % create left margin
text(8, .96, 'd_n', "fontsize", 14)
text(100, -0.05, '\leftarrow   n   \rightarrow')

%h = legend('\pi\alpha=    2; \alpha=0.64', '\pi\alpha=    8; \alpha=2.55',...
%	    '\pi\alpha=  24; \alpha=7.64',  '\pi\alpha=100; \alpha=31.8');
%But let's do it a less "manual" way:
h = legend(['\pi\alpha=    ' num2str(betas(1),'%3i') '; \alpha=' num2str(betas(1)/pi,'%5.2f')],...
           ['\pi\alpha=    ' num2str(betas(2),'%3i') '; \alpha=' num2str(betas(2)/pi,'%5.2f')],...
           ['\pi\alpha=  '   num2str(betas(3),'%3i') '; \alpha=' num2str(betas(3)/pi,'%5.2f')],...
           ['\pi\alpha='     num2str(betas(4),'%3i') '; \alpha=' num2str(betas(4)/pi,'%5.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\Kbd-window.svg')
  warning("off", "Octave:missing-glyph");
  set(h, "fontname","Symbol");
Category:Created with GNU Octave Category:Images with Gnuplot source code Category:Images with Octave source code Category:Signal processing
Category:CC-Zero Category:Created with GNU Octave Category:Images with Gnuplot source code Category:Images with Octave source code Category:Self-published work Category:Signal processing Category:Valid SVG created with Octave