问题
使用 semilogx 绘制图形,横坐标不是对数。
原因
subplot(2,1,1)
box on; hold on;
Hold on 阻止了自动更新,hold on may prevent MATLAB from automatically changing those properties, 详情见
此链接。
解决方法
删除绘制图形前的 hold on, 然后把 hold on 放在循环中,每次绘图后都使用 hold on,或者 参考此网站。
subplot(2,1,1)
semilogx(Freq, Magnitude, LineStyle{k}, 'LineWidth', LineWidth(k));
hold on;