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

📄 fir_4type.m

📁 很多matlab的源代码
💻 M
字号:
figure('position',[10 10 800 500],'name','零点的位置');
j1_sub = {'Type_I               M=11             对称'
          'Type_II              M=12             对称'
          'Type_III             M=11             反对称'
          'Type_IV             M=12             反对称'};
j1 = uicontrol('style','popupmenu',...
    'position',[100 450 300 25],...
    'string',j1_sub);
Hc_close=uicontrol(gcf,'style','push',...%
'position',[650 40 100 25],...        % 
'string','Close',...                 %
'Callback','Close');                 %以上四行代码是产生close按键   
Hc_info=uicontrol(gcf,'style','push',...%
'position',[650 100 100 25],...        % 
'string','info',...                 %
'Callback','web http://www.bupt.edu.cn -browser');                 %以上四行代码是产生info按键

subplot(1,1,1);
h = [-4,1,-1,-2,5,6,5,-2,-1,1,-4];
M = length(h);
n = 0:M-1;
[Hr,w,a,L] = Hr_Type1(h)
amax = max(a) +1;
amin = min(a) -1;
subplot(3,3,4);
stem(n,h);
axis([-1 2*L+1 amin amax])
xlabel('n');
ylabel('h(n)');
title('Ipmpulse Response');
subplot(3,3,7);
stem(0:L,a);
axis([-1 2*L+1 amin amax])
xlabel('n');
ylabel('a(n)');
title('a(n) cofficients');
subplot(3,3,5);
plot(w/pi,Hr);grid
xlabel('frequency in pi units');
ylabel('Hr');
title('Type=1 Amplitude Response');
subplot(3,3,8);
zplane(h,1)   
set(j1,'Callback','FIR_4type_sub');

⌨️ 快捷键说明

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