小白求教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/08/29 05:37:22
![小白求教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))](/uploads/image/z/13588591-31-1.jpg?t=%E5%B0%8F%E7%99%BD%E6%B1%82%E6%95%99MATLAB%E9%97%AE%E9%A2%98%E5%95%8Ak%3D300%3Bnum%5B0.0518%2C-0.1553%2C0.1553%2C0.0518%5D%3Bden%5B1%2C1.2828%2C1.0388%2C0.3418%5D%3Bw%3D0%3Api%2Fk%3Api%3Bh%3Dfreqz%28num%2Cden%2Cw%29%3Bsubplot%282%2C2%2C1%29%3Bplot%28w%2Fpi%2Creal%28h%29%29%3Bgridtitle%28%27%E5%AE%9E%E9%83%A8%27%29xlable%28%27%5Comega%2F%5Cpi%27%29%3Bylable%28%27%E5%B9%85%E5%BA%A6%27%29%3Bsubplot%282%2C2%2C2%29%3Bplot%28w%2Fpi%2Cimag%28h%29%29)
小白求教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