How can I make the FREQZ function (in the Signal Processing or Filter Design Toolboxes) produce a plot with a logarithmic frequency axis?
15 ビュー (過去 30 日間)
古いコメントを表示
The FREQZ function plots frequency on a linear axis. I would like an option to have frequency plot on a logarithmic axis instead.
採用された回答
MathWorks Support Team
2009 年 6 月 27 日
The ability to have the FREQZ function in the Communications Toolbox plot using a logarithmic frequency axis is not available.
To work around this issue, adjust the axis type after creating the figure. This can be done by executing the following MATLAB commands after plotting with FREQZ:
ax = findall(gcf, 'Type', 'axes');
set(ax, 'XScale', 'log');
This will reset the scale on the "x" axes (there are two, superimposed--one for magnitude, one for phase). You will likely wish to specify new x-axis limits. This can be done by executing:
set(ax, 'XLim', [xmin xmax]);
where "xmin" and "xmax" are your desired lower and upper x-axis limits, respectively.
Alternatively, you can return the filter response information by using the FREQZ syntax:
[h, w] = freqz(...);
where your particular arguments are included in place of "...".
Then, you can use the SEMILOGX function or other other plot functions to create your custom plots from "h" and "w".
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Filter Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!