解决了没有?我知道了,你是不是在学习呀!关键是你没有定义这个函数,此函数为
function hd=ideal_lp(wc,M);
%Ideal Lowpass filter computation
%------------------------------------
%[hd]=ideal_lp(wc,M)
% hd=ideal impulse response between 0 to M-1
% wc=cutoff frequency in radians
% M=length of the ideal filter
%
alpha=(M-1)/2;
n=[0:1:(M-1)];
m=n-alpha+eps;
hd=sin(wc*m)./(pi*m);
点击file中的new中M-file,新建上面的函数,保存后就可以运行了