clear all;close all;load('C:\Users\life-XD\Desktop\03.mat')wc = .01*piL = 128; for i = 1:L+1\x05% Generate sin(x)/x function Make symmetrical n = i-L/2 ; if n == 0 hn(i) = wc/pi; else \x05 hn(i)

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 03:46:40
clearall;closeall;load('C:\Users\life-XD\Desktop\03.mat')wc=.01*piL=128;fori=1:L+1\x05%Gener

clear all;close all;load('C:\Users\life-XD\Desktop\03.mat')wc = .01*piL = 128; for i = 1:L+1\x05% Generate sin(x)/x function Make symmetrical n = i-L/2 ; if n == 0 hn(i) = wc/pi; else \x05 hn(i)
clear all;
close all;
load('C:\Users\life-XD\Desktop\03.mat')
wc = .01*pi
L = 128;
    for i = 1:L+1\x05% Generate sin(x)/x function Make symmetrical
        n = i-L/2 ;
        if n == 0
            hn(i) = wc/pi;
        else   
   \x05        hn(i) = (sin(wc*(n)))/(pi*n); %Filter impulse response
        end
   
    %hn = hn .* blackman(L+1)';
    [nu,ar]=size(b);
    for


j=1:nu;

        z(h)=b(j,:);
    
    end
    H = conv(z(j),hn);
    
    plot(n,H);
    axis([0 50 0 2]);
    xlabel('Freqency (Hz)');
    ylabel('H(f)');
end

clear all;close all;load('C:\Users\life-XD\Desktop\03.mat')wc = .01*piL = 128; for i = 1:L+1\x05% Generate sin(x)/x function Make symmetrical n = i-L/2 ; if n == 0 hn(i) = wc/pi; else \x05 hn(i)
你整个程序中就没有定义h这个变量.