MATLAB画bode图横坐标设置为Hz 纵坐标限制±180之间

时间:2024-03-10 14:47:46

%% 有用记得点推荐喔

P=bodeoptions;
P.Grid=\'on\';% 格子
P.XLim={[1 1000]};% 横坐标范围
P.XLimMode={\'manual\'};% 冻结坐标轴刻度,可有可无
P.FreqUnits=\'Hz\';% 设置值模式
P.PhaseWrapping=\'on\';% 相频特性 限制范围
P.PhaseWrappingBranch=-180;% ±180之间
figure(1)
bode(Yp,P,\'b\');hold on;