summaryrefslogtreecommitdiff
path: root/1445/CH2/EX2.14
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1445/CH2/EX2.14
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 '1445/CH2/EX2.14')
-rw-r--r--1445/CH2/EX2.14/ch2_ex_14.sce38
1 files changed, 38 insertions, 0 deletions
diff --git a/1445/CH2/EX2.14/ch2_ex_14.sce b/1445/CH2/EX2.14/ch2_ex_14.sce
new file mode 100644
index 000000000..2d3da2eff
--- /dev/null
+++ b/1445/CH2/EX2.14/ch2_ex_14.sce
@@ -0,0 +1,38 @@
+//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT
+//Example 14
+
+disp("CHAPTER 2");
+disp("EXAMPLE 14");
+
+//VARIABLE INITIALIZATION
+v=100; //amplitude of rms value of voltage in Volts
+I=20; //amplitude of rms value of current in Amperes
+
+//SOLUTION
+
+//solution(i)
+w=314; //angular frequency in radian/sec
+f=w/(2*%pi); //as w=2*(%pi)*f
+f=ceil(f);
+disp(sprintf("(i) The frequency is %d Hz",f));
+
+//solution (ii)
+E=v/sqrt(2);
+angle_E=-45; //in degrees
+I=I/sqrt(2);
+angle_I=-90; //in degrees
+z=E/I;
+angle=angle_E-angle_I;
+disp(sprintf("(ii) The impedance is %d Ω, %d degrees",z,angle));
+
+function [x,y]=pol2rect(mag,angle1);
+x=mag*cos(angle1*(%pi/180)); //to convert the angle from degrees to radian
+y=mag*sin(angle1*(%pi/180));
+endfunction;
+[r,x]=pol2rect(z,angle);
+L=x/(2*%pi*f);
+disp(sprintf(" The inductance is %f H",L));
+
+//END
+
+