I suspect the issue it looks different is because your axes are using a linear scale instead of a logarithmic. Try this.
- first plot uses loglog. Removed 20*log10 from Y values. Replaced the axes command with xlim.
- Second plot uses semilogx
[zb,pb,kb] = butter(3,1,'s');
[bb,ab] = zp2tf(zb,pb,kb);
[h{1},w{1}] = freqs(bb,ab,1000);
[z1,p1,k1] = cheby1(3,1,1,'s');
[b1,a1] = zp2tf(z1,p1,k1);
[h{2},w{2}] = freqs(b1,a1,1000);
[ze,pe,ke] = ellip(3,1,30,1,'s');
[be,ae] = zp2tf(ze,pe,ke);
[h{3},w{3}] = freqs(be,ae,1000);
[zs,ps,ks] = besself(3,1);
[bs,as] = zp2tf(zs,ps,ks);
[h{4},w{4}] = freqs(bs,as,1000);
xlabel('Frequency (rad/s)');
ylabel('Attenuation (dB)');
legend('Butterworth','Chebyshev','Elliptik','Bessel','Location',"southwest");
semilogx(w{k},angle(h{k})*180/pi)
xlabel('Frequency (rad/s)');
legend('Butterworth','Chebyshev','Elliptik','Bessel','Location',"southwest");
Best Answer