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

📄 example4.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:40
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(1+14), 'IN', 2, ds, F, dc);                   
drawres(x(2), y(1+14), x(5), ' ', 'R1' ,0, ds/2, F, dc);     
drawnode(x(5), y(1+14), ' ', 1, 1, F, dc);                   
drawres(x(5), y(1+14), x(8), ' ', 'R2' ,0, ds/2, F, dc);     
drawopam(x(9), y(1+13), x(12), ' ', 'A' ,0, ds, F, dc);      
drawlvh(x(9), y(1+12),  x(12),  y(1+10), 0, dc);             
drawlhv(x(12), y(1+10),  x(12),  y(1+13), 0, dc);            
drawline(x(9), y(1+14), x(8), y(1+14), dc);                  
drawnode(x(8), y(1+14), ' ', 1, 1, F, dc);                   
drawcap(x(5), y(1+17), x(12), ' ', 'C1' ,0, ds/2, F, dc);    
drawcap(x(8), y(1+10), y(1+14), ' ', 'C2' ,1, ds/2, F, dc);  
drawgrnd(x(8), y(1+10), 0, ds, dc);                          
drawline(x(5), y(1+17), x(5), y(1+14), dc);                  
drawline(x(12), y(1+17), x(12), y(1+13), dc);                
drawnode(x(12), y(1+13), ' ', 1, 1, F, dc);                  
drawres(x(10+2), y(14), x(10+5), ' ', 'R3' ,0, ds/2, F, dc); 
drawnode(x(10+5), y(14), ' ', 1, 1, F, dc);                  
drawres(x(10+5), y(14), x(10+8), ' ', 'R4' ,0, ds/2, F, dc); 
drawopam(x(10+9), y(13), x(10+12), ' ', 'A' ,0, ds, F, dc);  
drawlvh(x(10+9), y(12),  x(10+12),  y(10), 0, dc);           
drawlhv(x(10+12), y(10),  x(10+12),  y(13), 0, dc);          
drawline(x(10+9), y(14), x(10+8), y(14), dc);                
drawnode(x(10+8), y(14), ' ', 1, 1, F, dc);                  
drawcap(x(10+5), y(17), x(10+12), ' ', 'C3' ,0, ds/2, F, dc);
drawcap(x(10+8), y(10), y(14), ' ', 'C4' ,1, ds/2, F, dc);   
drawgrnd(x(10+8), y(10), 0, ds, dc);                         
drawline(x(10+5), y(17), x(10+5), y(14), dc);                
drawline(x(10+12), y(17), x(10+12), y(13), dc);              
drawnode(x(10+12), y(13), ' ', 1, 1, F, dc);                 
drawcap(x(2), y(-9+14), x(5), ' ', 'C5' ,0, ds/2, F, 'b');    
drawnode(x(5), y(-9+14), ' ', 1, 1, F, 'b');                  
drawcap(x(5), y(-9+14), x(8), ' ', 'C6' ,0, ds/2, F, 'b');    
drawopam(x(9), y(-9+13), x(12), ' ', 'A' ,0, ds, F, 'b');     
drawlvh(x(9), y(-9+12),  x(12),  y(-9+10), 0, 'b');           
drawlhv(x(12), y(-9+10),  x(12),  y(-9+13), 0, 'b');          
drawline(x(9), y(-9+14), x(8), y(-9+14), 'b');                
drawnode(x(8), y(-9+14), ' ', 1, 1, F, 'b');                  
drawres(x(5), y(-9+17), x(12), ' ', 'R5' ,2, ds/2, F, 'b');   
drawres(x(8), y(-9+10), y(-9+14), ' ', 'R6' ,1, ds/2, F, 'b');
drawgrnd(x(8), y(-9+10), 0, ds, 'b');                         
drawline(x(5), y(-9+17), x(5), y(-9+14), 'b');                
drawline(x(12), y(-9+17), x(12), y(-9+13), 'b');              
drawnode(x(12), y(-9+13), ' ', 1, 1, F, 'b');                 
drawline(x(2), y(5), x(2), y(15), 'b');                       
drawnode(x(2), y(15), ' ', 1, 1, F, 'b');                     
axis('equal')
axis('off')

⌨️ 快捷键说明

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