幅频和相频特性分别在两个图窗,不在一起方便保存,无需再裁剪
clear; close all; k = 1; numH = 1; denH = [1,k]; sysH = tf(numH,denH); w = logspace(-2,2); [mag, phase] = bode(sysH,w); % 幅频特性 loglog(w,squeeze(mag));grid on; % 相频特性 semilogx(w, squeeze(phase));grid on;