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

📄 example2.m

📁 AFD - Advanced Filter Design using MATLABMiroslav D. Lutovac, Dejan V. Tosicversion 1.00 released 15
💻 M
字号:
function dr = auxfilt(x0,y0,dx,ds,F)
% auxfilt.m  Digital filter realization 
%            generated from the drawing window of the toolbox
%           "Drawing Digital Filter Realizations v1.0 beta"
%            by Miroslav D. Lutovac and Dejan V. Tosic (c) 1999 
%                                       
% Note:      Edit this file by an ASCII text editor and
%            save the new file under a different name.
%                                       
% See also:  Miroslav D. Lutovac, Dejan V. Tosic, Brian L. Evans
%           "Advanced Filter Design for Signal Processing
%            Using MATLAB and Mathematica"
%            http://galeb.etf.bg.ac.yu/~lutovac
%            http://telekom.etf.bg.ac.yu/~tosic
%                                       
% Contact:   Please, send your comments at
%             lutovac@galeb.etf.bg.ac.yu
%             tosic@telekom.etf.bg.ac.yu
%                                       
%            Your suggestions are appreciated!
%                                       
% call   auxfilt(0,0,4,5,10)
% creation date: 10-Oct-99  time: 15:19
Nx = 7;
Ny = 5;
whitebg(figure(gcf),[1 1 1]);
dc = 'k';
x = zeros(1,4*Nx);
y = zeros(1,4*Ny);
for indx = 1:4*Nx
 x(indx) = x0 + dx*indx/4;
end
for indy = 1:4*Ny
 y(indy) = y0 + dx*indy/4;
end
drawin(x(2), y(14), 'IN', 2, ds, F, dc);                     
drawres(x(2), y(14), x(5), ' ', 'R' ,0, ds/2, F, dc);        
drawnode(x(5), y(14), ' ', 1, 1, F, dc);                     
drawres(x(5), y(14), x(8), ' ', 'R' ,0, ds/2, F, dc);        
drawopam(x(9), y(13), x(12), ' ', 'A' ,0, ds, F, dc);        
drawlvh(x(9), y(12),  x(12),  y(10), 0, dc);                 
drawlhv(x(12), y(10),  x(12),  y(13), 0, dc);                
drawline(x(9), y(14), x(8), y(14), dc);                      
drawnode(x(8), y(14), ' ', 1, 1, F, dc);                     
drawcap(x(5), y(17), x(12), ' ', 'C' ,0, ds/2, F, dc);       
drawcap(x(8), y(10), y(14), ' ', 'C' ,1, ds/2, F, dc);       
drawgrnd(x(8), y(10), 0, ds, dc);                            
drawline(x(5), y(17), x(5), y(14), dc);                      
drawline(x(12), y(17), x(12), y(13), dc);                    
drawnode(x(12), y(13), ' ', 1, 1, F, dc);                    
drawres(x(10+2), y(-1+14), x(10+5), ' ', 'R' ,0, ds/2, F, 'b');        
drawnode(x(10+5), y(-1+14), ' ', 1, 1, F, 'b');                     
drawres(x(10+5), y(-1+14), x(10+8), ' ', 'R' ,0, ds/2, F, 'b');        
drawopam(x(10+9), y(-1+13), x(10+12), ' ', 'A' ,0, ds, F, 'b');        
drawlvh(x(10+9), y(-1+12),  x(10+12),  y(-1+10), 0, 'b');                 
drawlhv(x(10+12), y(-1+10),  x(10+12),  y(-1+13), 0, 'b');                
drawline(x(10+9), y(-1+14), x(10+8), y(-1+14), 'b');                      
drawnode(x(10+8), y(-1+14), ' ', 1, 1, F, 'b');                     
drawcap(x(10+5), y(-1+17), x(10+12), ' ', 'C' ,0, ds/2, F, 'b');       
drawcap(x(10+8), y(-1+10), y(-1+14), ' ', 'C' ,1, ds/2, F, 'b');       
drawgrnd(x(10+8), y(-1+10), 0, ds, 'b');                            
drawline(x(10+5), y(-1+17), x(10+5), y(-1+14), 'b');                      
drawline(x(10+12), y(-1+17), x(10+12), y(-1+13), 'b');                    
drawnode(x(10+12), y(-1+13), ' ', 1, 1, F, 'b');                    
axis('equal')
axis('off')

⌨️ 快捷键说明

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