summaryrefslogtreecommitdiff
path: root/569/CH3/EX3.15/3_15.sci
blob: 93f93b9656159985cccfeb0f7cbd2bea4ae63dd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
clc;
disp('When all the components have 0% error then resonant frequency (Hz)')
L=160*10^-6;
C=160*10^-12;
fr=[1/(2*%pi)]*[1/(L*C)]^0.5;
disp(fr)
disp('When all the components have +10% error then resonant frequency (Hz)')
L_new=(160*10^-6)+0.1*L;
C_new=(160*10^-12)+0.1*C;
fr_new=[1/(2*%pi)]*[1/(L_new*C_new)]^0.5;
disp(fr_new)
error=(fr_new-fr)/fr;
disp(error,'error=')
disp('When all the components have -10% error then resonant frequency (Hz)')
L_new=(160*10^-6)-0.1*L;
C_new=(160*10^-12)-0.1*C;
fr_new=[1/(2*%pi)]*[1/(L_new*C_new)]^0.5;
disp(fr_new)
error=(fr_new-fr)/fr;
disp(error,'error=')