summaryrefslogtreecommitdiff
path: root/3871/CH9/EX9.4/Ex9_4.sce
diff options
context:
space:
mode:
authorprashantsinalkar2018-02-03 11:01:52 +0530
committerprashantsinalkar2018-02-03 11:01:52 +0530
commit7bc77cb1ed33745c720952c92b3b2747c5cbf2df (patch)
tree449d555969bfd7befe906877abab098c6e63a0e8 /3871/CH9/EX9.4/Ex9_4.sce
parentd1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 (diff)
downloadScilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.tar.gz
Scilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.tar.bz2
Scilab-TBC-Uploads-7bc77cb1ed33745c720952c92b3b2747c5cbf2df.zip
Added new codeHEADmaster
Diffstat (limited to '3871/CH9/EX9.4/Ex9_4.sce')
-rw-r--r--3871/CH9/EX9.4/Ex9_4.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/3871/CH9/EX9.4/Ex9_4.sce b/3871/CH9/EX9.4/Ex9_4.sce
new file mode 100644
index 000000000..3d6e35306
--- /dev/null
+++ b/3871/CH9/EX9.4/Ex9_4.sce
@@ -0,0 +1,27 @@
+//===========================================================================
+//chapter 9 example 4
+clc;
+clear all;
+
+//variable declaration
+f1 = 60; //frequency in Hz
+f2 = 50; //frequency in Hz
+C1 = 10^-6; //inductance of circuit
+R1 = 100; //resistance in Ω
+C2 = 1.5*10^-6; //capacitance
+
+//calculations
+L1 = 1/(4*((%pi)^2)*((f1)^2)*C1); //inductance of circuit in H
+w = 2*%pi*f2;
+Z1 = R1+(%i)*((w*L1)-(1/(w*C1))); //impedance of circuit at 50 Hz Ω
+//Z2 = R1+(%i)*((w*L2)-(1/(w*C2))); //impedance of circuit at 50 Hz Ω
+//real(Z2) = real(Z1)
+//((w*L2)-(1/(w*C2))) = real(Z1)=963
+x =abs((w*L1)-(1/(w*C1)))
+y = 1/(w*C2);
+L2 =(x+y)/w;
+z = sqrt(1/(L2*C2));
+f2 = (1/(2*%pi))*(z);
+
+//result
+mprintf("resonant frequency of circuit = %3.1f Hz",f2);