# How can i plot frequency contect of the signal with TF code?

2 views (last 30 days)
Batuhan Samet Demirci on 30 Dec 2021
Answered: Paul on 31 Dec 2021
I wrote the code with 2 different ways and i get transfer function but i dont know how to plot it to see frequency contect for 80-6,80+6. I wanna see that proof to understand code is true. I attached the photo so you can understand what am i trying to say exactly. Thanks..
1st code ( I prefer this one. You can add code for plotting to this code.)
R= 1E+4 ; %10kOhm to 10000 ohm.
L = 14.98E-3; %14.98 mH to 0.01498 H
C= 0.018013E-14; %0.018013 pF to 0.018013x10^-14 F
a= R/L % i changed variables to write it easier on TF.
b= 1/(L*C) % i changed variables to write it easier on TF.
num = [a 0]
den = [1 a b]
H = tf(num,den) %TF
2nd code
R= 10; % k ohm.
L = 14.95; % mH
C= 0.018013; % pF
s = tf('s');
H(1) = R / ( R + L*s + (1 / C*s) )
H(2) = (R/L)*s / ( s^2 + (R/L)*s + 1/(L*C) )

Paul on 31 Dec 2021
The bode() command is one way to compute and visualize the frequency response of the transfer function.
doc bode