为什么用MATLAB显示空白?
clf;w=-pi:2*pi/255:pi;x1=[1357911131517];x2=[1-23-21];y=conv(x1,x2);h1=freqz(x1,1,w);...
clf;
w=-pi:2*pi/255: pi;
x1=[1 3 5 7 9 11 13 15 17];
x2=[1 -2 3 -2 1];
y=conv(x1,x2);
h1=freqz(x1,1,w);
h2=freqz(x2,1,w);
hp=hi.*h2;
h3=freqz(y,1,w);
subplot(2,2,1)
plot(w/pi,abs (hp));grid
title(‘幅度谱的乘积’)
subplot(2,2,2)
plot(w/pi,abs (h3));grid
title(‘卷积后序列的幅度谱’)
subplot(2,2,3)
plot(w/pi,angle (hp));grid
title(‘相位谱的和’)
subplot(2,2,4)
plot(w/pi,angle (h3));grid
title(‘卷积后序列的相位谱’) 展开
w=-pi:2*pi/255: pi;
x1=[1 3 5 7 9 11 13 15 17];
x2=[1 -2 3 -2 1];
y=conv(x1,x2);
h1=freqz(x1,1,w);
h2=freqz(x2,1,w);
hp=hi.*h2;
h3=freqz(y,1,w);
subplot(2,2,1)
plot(w/pi,abs (hp));grid
title(‘幅度谱的乘积’)
subplot(2,2,2)
plot(w/pi,abs (h3));grid
title(‘卷积后序列的幅度谱’)
subplot(2,2,3)
plot(w/pi,angle (hp));grid
title(‘相位谱的和’)
subplot(2,2,4)
plot(w/pi,angle (h3));grid
title(‘卷积后序列的相位谱’) 展开
1个回答
展开全部
% hp=hi.*h2; 改成 hp = h1.*h2;
% title(‘幅度谱的乘积’) 将引号全部改成半角符号
clf;
w=-pi:2*pi/255: pi;
x1=[1 3 5 7 9 11 13 15 17];
x2=[1 -2 3 -2 1];
y=conv(x1,x2);
h1=freqz(x1,1,w);
h2=freqz(x2,1,w);
hp=h1.*h2;
h3=freqz(y,1,w);
subplot(2,2,1)
plot(w/pi,abs (hp));grid
title('幅度谱的乘积')
subplot(2,2,2)
plot(w/pi,abs (h3));grid
title('卷积后序列的幅度谱')
subplot(2,2,3)
plot(w/pi,angle (hp));grid
title('相位谱的和')
subplot(2,2,4)
plot(w/pi,angle (h3));grid
title('卷积后序列的相位谱')
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询