How to extract numerical data from customized bode plot?

Hello,
I'm trying to extract the magnitude, phase, and frequency arrays from a bode plot I generate. I already know how to do this with the bode command, like this:
[mag,phase,w] = bode(tf(sys));
and this works. The problem is, the frequency array is in radians. I can convert it to Hz easily by dividing by 2pi, but then the starting frequency is at 1.6, not at 1. I'd like the frequency array to start and end at a magnitude of 10.
I also know I can specify a starting frequency and ending frequency as an input argument to the bode function, so I could implement a prescale to the function, but I want to retain the autoscaling capabilities of the bode function itself.
I tried doing something like this with the bodeplot function instead, to automatically change the radians to Hz:
opts = bodeoptions('cstprefs');
opts.FreqUnits = 'Hz';
[MAG,PHASE,W] = bodeplot(tf(numo,deno),opts);
But I get an error that there are too many output arguments.
What would be the easiest way to do this? Thanks much.

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Time and Frequency Domain Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by