diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1445/CH2/EX2.51/Ex2_51.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1445/CH2/EX2.51/Ex2_51.sce')
-rw-r--r-- | 1445/CH2/EX2.51/Ex2_51.sce | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/1445/CH2/EX2.51/Ex2_51.sce b/1445/CH2/EX2.51/Ex2_51.sce new file mode 100644 index 000000000..85f7d494b --- /dev/null +++ b/1445/CH2/EX2.51/Ex2_51.sce @@ -0,0 +1,30 @@ +//CHAPTER 2- STEADY-STATE ANALYSIS OF SINGLE-PHASE A.C. CIRCUIT +//Example 51 + +disp("CHAPTER 2"); +disp("EXAMPLE 51"); +// +//Given +// admittance of branches are: +//Y1=0.4+j0.6 +//Y2=0.1+j0.4 +//Y3=0.06+j0.23 +// +//VARIABLE INITIALIZATION +Y1=0.4+(%i*0.6); //admittance of 1st branch in Siemens +Y2=0.1+(%i*0.4); //admittance of 2nd branch in Siemens +Y3=0.06+(%i*0.23); //admittance of 3rd branch in Siemens + +//SOLUTION +Y=Y1+Y2+Y3; // total admittance +//function to convert from rectangular form to polar form +function [Y,angle]=rect2pol(x,y); +Y=sqrt((x^2)+(y^2)); +angle=atan(y/x)*(180/%pi); //to convert the angle from radians to degrees +endfunction; +[Y,angle]=rect2pol(real(Y),imag(Y)); +disp(sprintf("The total admittance of the circuit is %.3f S, %.2f degrees",Y,angle)); +z=1/Y; +disp(sprintf("The impedance of the circuit is %.3f Ω, %.2f degrees",z,-angle)); +// +//END |