summaryrefslogtreecommitdiff
path: root/1958/CH12/EX12.6/Chapter12_example12_6.sce
diff options
context:
space:
mode:
Diffstat (limited to '1958/CH12/EX12.6/Chapter12_example12_6.sce')
-rwxr-xr-x1958/CH12/EX12.6/Chapter12_example12_6.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1958/CH12/EX12.6/Chapter12_example12_6.sce b/1958/CH12/EX12.6/Chapter12_example12_6.sce
new file mode 100755
index 000000000..4bb2845d6
--- /dev/null
+++ b/1958/CH12/EX12.6/Chapter12_example12_6.sce
@@ -0,0 +1,14 @@
+clc
+clear
+//Input data
+L=6//Inductance in mH
+C=12//Capacitance in pF
+V=6//Voltage of the battery in V
+
+//Calculations
+f=(1/(2*3.14*sqrt(L*10^-3*C*10^-12)))/10^5//Frequency of oscillation in Hz*10^5
+Qm=(C*10^-12*V)/10^-12//Maximum charge in C *10^-12
+Im=(2*3.14*f*10^5*Qm*10^-12)/10^-6//Maximum current in micro A
+
+//Output
+printf('Frequency of oscillation is %3.2f *10^5 Hz \n The maximum value of charge on capacitor is %i *10^-12 C \n The current in the circuit is %i micro A',f,Qm,Im)