summaryrefslogtreecommitdiff
path: root/147/CH3/EX3.13/Example3_13.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /147/CH3/EX3.13/Example3_13.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '147/CH3/EX3.13/Example3_13.sce')
-rw-r--r--147/CH3/EX3.13/Example3_13.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/147/CH3/EX3.13/Example3_13.sce b/147/CH3/EX3.13/Example3_13.sce
new file mode 100644
index 000000000..a43ff963a
--- /dev/null
+++ b/147/CH3/EX3.13/Example3_13.sce
@@ -0,0 +1,17 @@
+close();
+clear;
+clc;
+//resistance 'R', inductance 'L', angular frequency 'w', phase difference 'theta'
+R = 20; //ohm
+L = 15*10^(-3); //mH
+w = 1000; //rad/s
+theta = 45; //degree
+//net reactance of parallel LC combination = 20 ohm or -20 ohm
+C1 = poly(0,'C1');
+pc1 = 1/(%i*w*L) - 1/(R*%i) + %i*w*C1;
+C1 = roots(pc1);
+C2 = poly(0,'C2');
+pc2 = 1/(%i*w*L) + 1/(R*%i) + %i*w*C2;
+C2 = roots(pc2);
+mprintf("C1 = %0.2f uF\nC2 = %0.1f uF\n\n",C1*10^6, C2*10^6);
+mprintf("For smaller (larger) capacitance, I lags (leads) V by 45 degree"); \ No newline at end of file