How to extract numerical data from customized bode plot?
Afficher commentaires plus anciens
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.
Réponses (0)
Catégories
En savoir plus sur Time and Frequency Domain Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!