Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: BODE function - frequency from rad/s to hz?
Replies: 0

 Search Thread: Advanced Search

 ms Posts: 61 Registered: 11/6/06
BODE function - frequency from rad/s to hz?
Posted: Mar 29, 2011 1:37 PM
 Plain Text Reply

Dear Group,

I have been trying to change the frequency from rad/s to hz when using
the BODE function. That is, when using the BODE function to plot
Amplitude and Phase, the x axis is automatically in rad/s and on a log
scale. I would like to change it to hertz and on a linear scale. Is
there a way to change this so that it will use hz and a linear scale?
I know you can convert it on your own when defining outputs of the
BODE function, like:

[magnitude, phase, freq] = bode(X);%when X is iddata
freq_hz = freq/(2*pi);

I also looked on previous posts and some suggested using

set(cstprefs.tbxprefs,'FrequencyUnits','Hz')
OR
ctrlpref
OR
fkids=get(gcf,'children');
kh=findobj(fkids,'tag','ResponseObjectContextMenu');
uh=get(kh,'UserData');
set(uh,'FrequencyUnits','Hz')

none of which seem to work in Matlab v.R2008

Any help would be greatly appreciated!

© The Math Forum at NCTM 1994-2018. All Rights Reserved.