Commit e1d7663b authored by 袁通's avatar 袁通
Browse files

Update lab5.m

parent dfe72d8e
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -11,8 +11,8 @@ plot(w,Pxx);
title('The power spectral density of the speech signal');
xlabel('w');
ylabel('Pxx');
saveas(gcf, "plots/P5_1_out1.png");
close;
% saveas(gcf, "plots/P5_1_out1.png");
% close;

b=fir2(3000,w/(fs/2),sqrt(Pxx/max(Pxx)));
[h,wh]=freqz(b,1,128);
@@ -23,8 +23,8 @@ plot(w1,Pxx1);
title('The power spectral density of the speech-shaped noise');
xlabel('w1');
ylabel('Pxx1');
saveas(gcf, "plots/P5_1_out2.png");
close;
% saveas(gcf, "plots/P5_1_out2.png");
% close;


%5.2
@@ -60,8 +60,8 @@ subplot(3,1,3);
plot(envelop3);
title('f_{cut}=300 Hz');
xlim([0,6000]);
saveas(gcf, "plots/P5_3_out1.png");
close;
% saveas(gcf, "plots/P5_3_out1.png");
% close;

figure(4);
[b,a]=butter(2,200/(fs/2));
@@ -77,5 +77,5 @@ subplot(2,1,2);
plot(envelop);
title('6th order');
xlim([0,6000]);
saveas(gcf, "plots/P5_3_out2.png");
close;
 No newline at end of file
% saveas(gcf, "plots/P5_3_out2.png");
% close;
 No newline at end of file