dfdsdemo.m

来自「AFD - Advanced Filter Design using MATLA」· M 代码 · 共 66 行

M
66
字号
% dfdsdemo.m  ADFDS demo specification (script)
%
% 15:55  17/2/99
%
%   Authors: Dejan V. Tosic, Miroslav D. Lutovac, 1999.02.16
%                 tosic@telekom.etf.bg.ac.yu
%                 lutovac@galeb.etf.bg.ac.yu
%
%   Copyright (c) 1999 by Tosic & Lutovac
%   $Revision: 1.0 $  $Date: 1999/02/16 21:27:42 $
%
%   References:
%        Miroslav D. Lutovac, Dejan V. Tosic, Brian L. Evans
%           Advanced Filter Design for Signal Processing
%                   Using MATLAB and Mathematica

speca = [0.2,  0.212,  0.2,   40];

dstable = ...
[8   1.04285  1.09245  0.0625785    0.217091  0.19406    0.203289
 9   1.022    1.11016  0.0143176    0.217091  0.190964   0.207436
10   1.01135  1.13668  0.002622     0.217091  0.186508   0.20962
11   1.00587  1.17518  0.000365604  0.217091  0.180398   0.210762
12   1.00304  1.23116  0.000036102  0.217091  0.172196   0.211357
13   1.00158  1.31502  2.23768e-6   0.217091  0.161215   0.211666
14   1.00082  1.44883  6.96606e-8   0.217091  0.146325   0.211827
15   1.00042  1.69028  6.68433e-10  0.217091  0.125423   0.21191
16   1.00022  2.269    4.3985e-13   0.217091  0.0934332  0.211953];

Nmin = min(dstable(:,1));
Nmax = max(dstable(:,1));
Nlength = length(dstable(:,1));
Nindex = 0;
Xmin = min(dstable(:,2));
Xmax = max(dstable(:,3));
Emin = min(dstable(:,4));
Emax = max(dstable(:,5));
FPmin = min(dstable(:,6));
FPmax = max(dstable(:,7));

Xmin1 = dstable(1,2);
Xmax1 = dstable(1,3);
Emin1 = dstable(1,4);
Emax1 = dstable(1,5);
FPmin1 = dstable(1,6);
FPmax1 = dstable(1,7);

cubeaxis = [1, Xmax*1.01, 0, Emax*1.01, FPmin*0.99, FPmax*1.01];
caseaxis = [Xmin1*0.99, Xmax1, 0, Emax1*1.01, FPmin1, FPmax1];

initview = [-40,30];
cubeview = initview;
caseview = [-20 40];

delete(gca);
axis off;
text(0,0.9, 'Demo lowpass attenuation limits specification')
text(0,0.8, ['Fpass = ', num2str(speca(1))]);
text(0,0.7, ['Fstop = ', num2str(speca(2))]);
text(0,0.6, ['Apass = ', num2str(speca(3)), ' dB']);
text(0,0.5, ['Astop = ', num2str(speca(4)), ' dB']);
text(0,0.4, 'Fpass = passband edge frequency');
text(0,0.3, 'Fstop = stopband edge frequency')
text(0,0.2, 'Apass = maximum passband attenuation in dB')
text(0,0.1, 'Astop = minimum stopband attenuation in dB')

⌨️ 快捷键说明

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