小白求教MATLAB问题啊k=300;num[0.0518,-0.1553,0.1553,0.0518];den[1,1.2828,1.0388,0.3418];w=0:pi/k:pi;h=freqz(num,den,w);subplot(2,2,1);plot(w/pi,real(h));gridtitle('实部')xlable('\omega/\pi');ylable('幅度');subplot(2,2,2);plot(w/pi,imag(h))
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 02:40:13
小白求教MATLAB问题啊k=300;num[0.0518,-0.1553,0.1553,0.0518];den[1,1.2828,1.0388,0.3418];w=0:pi/k:pi;h=freqz(num,den,w);subplot(2,2,1);plot(w/pi,real(h));gridtitle('实部')xlable('\omega/\pi');ylable('幅度');subplot(2,2,2);plot(w/pi,imag(h))
小白求教MATLAB问题啊
k=300;
num[0.0518,-0.1553,0.1553,0.0518];
den[1,1.2828,1.0388,0.3418];
w=0:pi/k:pi;
h=freqz(num,den,w);
subplot(2,2,1);
plot(w/pi,real(h));grid
title('实部')
xlable('\omega/\pi');ylable('幅度');
subplot(2,2,2);
plot(w/pi,imag(h));grid
title('虚部')
xlable('\omega/\pi');ylable('A');
subplot(2,2,3);
plot(w/pi,abs(h));grid
title('幅值')
xlable('\omega/\pi');ylable('幅值');
subplot(2,2,4);
plot(w/pi,angle(h));grid
title('相位谱')
xlable('\omega/\pi');ylable('弧度');
小白求教MATLAB问题啊k=300;num[0.0518,-0.1553,0.1553,0.0518];den[1,1.2828,1.0388,0.3418];w=0:pi/k:pi;h=freqz(num,den,w);subplot(2,2,1);plot(w/pi,real(h));gridtitle('实部')xlable('\omega/\pi');ylable('幅度');subplot(2,2,2);plot(w/pi,imag(h))
k=300;
num=[0.0518,-0.1553,0.1553,0.0518];
den=[1,1.2828,1.0388,0.3418];
w=0:pi/k:pi;
h=freqz(num,den,w);
subplot(2,2,1);
plot(w/pi,real(h));grid
title('实部')
xlabel('\omega/\pi');ylabel('幅度');
subplot(2,2,2);
plot(w/pi,imag(h));grid
title('虚部')
xlabel('\omega/\pi');ylabel('A');
subplot(2,2,3);
plot(w/pi,abs(h));grid
title('幅值')
xlabel('\omega/\pi');ylabel('幅值');
subplot(2,2,4);
plot(w/pi,angle(h));grid
title('相位谱')
xlabel('\omega/\pi');ylabel('弧度');
错误2处:
1)第2,3行的赋值应该有 = 号
2)xlable,ylable 应该为xlabel,ylabel