How do I zoom in on a certain section of a magnitude bode plot

5 ビュー (過去 30 日間)
matthew henderson
matthew henderson 2022 年 9 月 28 日
コメント済み: KSSV 2022 年 9 月 28 日
I have used the bode(g),grid function to plot a magnitude and phase plot from my transfer function, I now wish to zoom in on a specific section of the magnitude plot. Is this possile and if so how do I go about doing it?
Here is my code:
num = [1];
den = [1 0.04946 3.00316 0.0989847 3.00322 0.0494631 1.00006];
g=tf(num, den)
bode(g),grid
Here is an image of my plot< i would like to zoom in of the peak of the magnitude plot of my bandpass filters transfer function.
  2 件のコメント
KSSV
KSSV 2022 年 9 月 28 日
Use axis with your required limits.
KSSV
KSSV 2022 年 9 月 28 日
num = [1];
den = [1 0.04946 3.00316 0.0989847 3.00322 0.0494631 1.00006];
g=tf(num, den)
g = 1 ----------------------------------------------------------------------- s^6 + 0.04946 s^5 + 3.003 s^4 + 0.09898 s^3 + 3.003 s^2 + 0.04946 s + 1 Continuous-time transfer function.
bode(g),grid
xlim([0.8 1.2])

サインインしてコメントする。

回答 (1 件)

Chunru
Chunru 2022 年 9 月 28 日
num = [1];
den = [1 0.04946 3.00316 0.0989847 3.00322 0.0494631 1.00006];
g=tf(num, den)
g = 1 ----------------------------------------------------------------------- s^6 + 0.04946 s^5 + 3.003 s^4 + 0.09898 s^3 + 3.003 s^2 + 0.04946 s + 1 Continuous-time transfer function.
bode(g)
grid on
ax = findobj(gcf, "Type", "Axes");
set(ax, "XLim", [0.8 1.2])

カテゴリ

Help Center および File ExchangeScopes and Data Logging についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by