📄 ex_09_09_1.m
字号:
% ex_09_09_1.m :习题 9.9
clear all;
close all;
m_c=pi/6;
m_v=12;
t=-m_v:0.3:m_v;
y=cos(m_c*t);
L=2;
[y_L,h_L]=interp(y,L,4,0.25);
m_fh1=fft(h_L);
m_fh1=fftshift(m_fh1);
length=length(m_fh1);
m_fh1=m_fh1(length/2:length);
m_N=ceil(length/2);
a=linspace(0,0.5,m_N);
f=[0 .6 .7 1];
A=[1 1 0 0];
weigh=[1 10];
b=remez(32,f,A,weigh);
[h,w]=freqz(b,1,256,1);
h1=abs(h);h1=20*log10(h1);
M=3;
y_M=decimate(y,M,31,'FIR');
y_LM=resample(y,L,M);
subplot(421);stem(y,'.');
subplot(422);stem(h_L,'.');
subplot(423);stem(y_L,'.');
subplot(424);plot(a,abs(m_fh1));
subplot(425);stem(y_M,'.');
subplot(426);stem(b,'.');
subplot(427);stem(y_LM,'.');
subplot(428);plot(w,h1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -