Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab way to extract the frequency from a bode plot

Status
Not open for further replies.

psi

Member level 2
Member level 2
Joined
Jan 13, 2003
Messages
42
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
268
In matlab is there a way to extract the frequency from a bode plot for a given magnitude?

You can extract the magnitude for a given frequency, but I want it to be the other way around.

Thanks
 

It can be done in this way:

clear all
kg=tf([20],[1 2 0])
nupoints=1000;%finest reticule, best result
freq=logspace(-2,2,nupoints);
[mag1(1:nupoints),phase1(1:nupoints)]=bode(kg,freq);
mag=20*log10(mag1)
semilogx(freq,mag);%seeing the bode plot obtained
% by example I go to find a frecuence at which the magitude is 20dB
% for this we do interpolation over the obtained curve
hold on
desiredw=interp1(mag,freq,20)
plot(desiredw,20,'r+')% see the value


regards
nebisman
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top