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

📄 geng13.m

📁 用matlab仿真的xc = [1 1 1 1 1 1 1 1 1 1] 的fft时序幅频图形
💻 M
字号:
clear;                                %      Remove items from workspace, freeing up system memory                                       
clc;                                  %      Clear Command Window
close all;                            %       deletes all figures whose handles are not hidden.
         
         xc = [1 1 1 1 1 1 1 1 1 1];
          n_xc = 0:length(xc) - 1;
          xc_fft = fft(xc,32);
          n_xc_fft = 0: length(xc_fft)-1;
          figure(1);
          subplot(121);
          xlabel('n');
          ylabel('xc(n)');
          title('xc(n)的时序图');
          stem(n_xc, xc,'.');
          subplot(122)
          plot(n_xc_fft, abs(xc_fft));
          xlabel('n');
          ylabel('|Xc(ej\omega)|');
          title('xc(n) 的幅频图');
          
     ha = [1 1 1 1 1 1 1 1 1 1];
     n_ha = 0: length(ha)-1;
     ha_fft = fft(ha, 32);
     n_ha_fft = 0 : length(ha_fft)-1;
     figure(2);
     subplot(121);
     stem(n_ha, ha,'.');
      xlabel('n');
      ylabel('h(n)');
      title('ha(n)的时序图');
     subplot(122);
      plot(n_ha_fft, abs(ha_fft));
      xlabel('n');
      ylabel('|ha(ej\omega)|');
      title('ha(n) 的幅频图');
          
y = conv(xc, ha);
y_fft = fft(y, 32);
n_y = 0: length(y)-1;
n_y_fft = 0:length(y_fft) -1;
figure(3);
subplot(121)
stem(n_y, y,'.');
xlabel('n');
ylabel('y(n)');
title('y(n)的时序图');
subplot(122);
plot(n_y_fft, abs(y_fft));
xlabel('n');
ylabel('|y(ej\omega)|');
title('y(n) 的幅频图');

⌨️ 快捷键说明

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