How Do You Correctly Plot a Bode Diagram for a High-Pass Filter in MATLAB?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 11K views
gimini75
Messages
50
Reaction score
0
Hi

I have a transfer function< I want to draw a bode diagram in MATLAB, the transfer function is for a simple HPF when I use MATLAB to find the magnitude and phase shift it giving a wrong diagram, the transfer function is:

=RCs / (RCs + 1)
I want to know how shoud I have to manipulate this function in MATLAB to find the correct answer?
Capacitance = 220 nF
R = 10 kilo ohm
Thanks
 
Physics news on Phys.org
s=tf('s');
RC=220e-12*1e4;
G=RC*s/(RC*s+1);
bode(G)