summaryrefslogtreecommitdiff
path: root/2210/CH5/EX5.20/5_20.sce
diff options
context:
space:
mode:
Diffstat (limited to '2210/CH5/EX5.20/5_20.sce')
-rwxr-xr-x2210/CH5/EX5.20/5_20.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/2210/CH5/EX5.20/5_20.sce b/2210/CH5/EX5.20/5_20.sce
new file mode 100755
index 000000000..54329dfe6
--- /dev/null
+++ b/2210/CH5/EX5.20/5_20.sce
@@ -0,0 +1,12 @@
+//Chapter 5, Problem 20
+clc
+f=10e6 //frequency in hertz
+Ls=15e-6 //capacitance in farad
+Rs=2 //resistance in ohm
+
+//calculation
+Qs=(2*%pi*f*Ls)/Rs
+Rp=Rs*(1+(Qs^2))
+Lp=((1+Qs^2)/Qs^2)*Ls
+
+printf("Resistance Rp = %d Kohm\n\n Inductance Lp = %d uH\n\n Quality factor Qp = %d",Rp/1000,Lp*10^6,Qs)