wp=1800; %pass f maxws=2000;%截止fsRp=.3; %pass Rs=50; %stop >Rs dB;[N, Wn] = buttord(wp/(fs/2), ws/(fs/2), Rp, Rs);[b,a]=butter(N,Wn); %[B,A] = BUTTER(N,Wn),Wn是归一化频率,具体计算方法是(2*截止频率)/采样频率。[h,w]=freqz(b,a); tt='lowpass'; %tt为标题字符串,表示是哪种滤波器
试试平滑函数smooth, 看看有没有效果>Y=smooth(Y)>plot(Y)