ws = 2000;
wC = 500;
[b, a] = butter(8,0.2, 'high')
[h, w] = freqz(b, a) ;
subplot (221) ;
plot (w/pi * ws/ 2, abs (h) ) ;
title(‘幅频响应');
xlabel('频率 Frequency(Hz)");
ylabel('幅度 Amplitude');
grid on;
subplot ( 223) ;
plot (w/pi * ws/2, angle(h) * 180/pi);
title('相频响应');
xlabel('频率 Freguency (Hz)');
Ylabel('相位');
grid on;
x = rand(1, ws * 20) ;
y = filter (b,a, x) ;
subplot (222) ;
plot (x) ;
title('原始随机信号');
grid on;
subplot (224) ;
plot (y) ;
title('滤波器处理后的输出信号');
grid on;
wC = 500;
[b, a] = butter(8,0.2, 'high')
[h, w] = freqz(b, a) ;
subplot (221) ;
plot (w/pi * ws/ 2, abs (h) ) ;
title(‘幅频响应');
xlabel('频率 Frequency(Hz)");
ylabel('幅度 Amplitude');
grid on;
subplot ( 223) ;
plot (w/pi * ws/2, angle(h) * 180/pi);
title('相频响应');
xlabel('频率 Freguency (Hz)');
Ylabel('相位');
grid on;
x = rand(1, ws * 20) ;
y = filter (b,a, x) ;
subplot (222) ;
plot (x) ;
title('原始随机信号');
grid on;
subplot (224) ;
plot (y) ;
title('滤波器处理后的输出信号');
grid on;