summaryrefslogtreecommitdiff
path: root/3871/CH12/EX12.22/Ex12_22.sce
diff options
context:
space:
mode:
Diffstat (limited to '3871/CH12/EX12.22/Ex12_22.sce')
-rw-r--r--3871/CH12/EX12.22/Ex12_22.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3871/CH12/EX12.22/Ex12_22.sce b/3871/CH12/EX12.22/Ex12_22.sce
new file mode 100644
index 000000000..898a0dce7
--- /dev/null
+++ b/3871/CH12/EX12.22/Ex12_22.sce
@@ -0,0 +1,19 @@
+//=====================================================================================
+//Chapter 12 example 22
+
+clc;clear all;
+
+//variable declaration
+f1 = 2*10^6; //frequency from second data in Hz
+f2 = 1*10^6; //frequency from first data in Hz
+C1 = 230*10^-12; //capacitance in F
+C2 = 8*10^-12; //capacitance in F
+
+//calculations
+C = C1+C2;
+L = 1/((((2*(%pi)*f1)^2)*C)); //inductance in uH
+Cx = 1/(((2*(%pi)*f2)^2)*L); //capacitance in pF
+
+//result
+mprintf("inductance = %3.2f uH",(L*10^6));
+mprintf("\ncapacitance = %3.2f pF",(Cx*10^12));