How do I plot this?
18 次查看(过去 30 天)
显示 更早的评论
How do I plot the magnitude of a transfer function H?
0 个评论
采纳的回答
Star Strider
2018-2-23
It depends on the Toolbox you’re using.
For a filter using the Signal Processing Toolbox, use the freqz (link) or freqs (link on the freqz page) functions.
For a control system using the Control System Toolbox, use the bode (link) function. Note that it is essentially impossible to change any of the plot characteristics using bode, so if you want to customise the plot, get the outputs from bode and plot them using the subplot function.
2 个评论
Star Strider
2018-2-23
Yes. That is the only way I know of to do it.
To replicate the bode plot result, this works:
figure
subplot(2,1,1)
semilogx(wout, 20*log10(squeeze(mag)), '-r', 'LineWidth',2)
grid
subplot(2,1,2)
semilogx(wout, squeeze(phase), '-r', 'LineWidth',2)
grid
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Plot Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!