⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 firkaiser.m

📁 linear time-frequency toolbox
💻 M
字号:
function g=firkaiser(p1,p2,p3,p4)%FIRKAISER  Kaiser-Bessel window%   Usage:  g=firkaiser(M,beta);%           g=firkaiser(M,beta,centering);%%   FIRKAISER(M,beta) computes the Kaiser-Bessel window of length M with%   parameter beta.%%   FIRKAISER(M,beta,'zero') will set the smallest element of the window%   to zero. This makes it possible to use the window for a Wilson basis.%%   FIRKAISER(M,beta,centering) will create a window centered as %   specified by centering. The default (centering=0) is to return%   a whole-point centered window, while a value of .5 will produce a%   half-point even function (traditional signal processing style).%%   SEE ALSO: FIRWIN%%   REFERENCES:%     A. V. Oppenheim and R. W. Schafer. Discrete-time signal processing. Prentice%     Hall, Englewood Cliffs, NJ, 1989.error(nargchk(2,4,nargin));if ischar(p1)  % The user supplied a type argument  if nargin==2    error('Two few input arguments.');  end;  stype=p1;  M=p2;  z=p3;    if nargin==3    centering=0;  else    centering=p4;  end;else  stype='normal';  M=p1;  z=p2;    if nargin==2    centering=0;  else    centering=p3;  end;end;switch centering  case {'zero','Zero','ZERO'}    centering=0;    dozero=1;  otherwise    dozero=0;end;m=2*((0:M-1)+centering).'/M-1;switch lower(stype)  case {'n','normal'}    g=besseli(0,z*sqrt(1-m.^2))/besseli(0,z);    g=fftshift(g);  case {'d','deriv','derived'}    g=besseli(0,z*sqrt(1-m.^2))/besseli(0,z);        g1=sqrt(cumsum(g(1:M/2))./sum(g(1:M/2)));    if centering==0      g=[flipud(g1);...	 0;	 g1(1:M/2-1)];    else      g=[flipud(g1);...	 g1];    end;            otherwise    error('Unknown window type.');end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -