diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3532/CH1/EX1.6.1/Ex1_6.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '3532/CH1/EX1.6.1/Ex1_6.sce')
-rw-r--r-- | 3532/CH1/EX1.6.1/Ex1_6.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/3532/CH1/EX1.6.1/Ex1_6.sce b/3532/CH1/EX1.6.1/Ex1_6.sce new file mode 100644 index 000000000..6d4966f45 --- /dev/null +++ b/3532/CH1/EX1.6.1/Ex1_6.sce @@ -0,0 +1,26 @@ +clc
+clear
+mprintf('Mechanical vibrations by G.K.Grover\n Example 1.6.1\n')
+//given data
+//case 1
+//a complex number is represented as Z=X+j*Y where j is imaginary
+//V=3 +j*7
+x1=3
+y1=7
+//calculations
+r1=sqrt(x1^2+y1^2)
+ if (y1/x1)>0 then theta1=atan(y1/x1)
+ else theta1=%pi-atan(abs(y1/x1))
+ end
+theta1=atan(y1/x1)
+//case 2
+//V=-5 +j*4
+x2=-5
+y2=4
+//calculations
+r2=sqrt(x2^2+y2^2)
+ if (y2/x2)>0 then theta1=atan(y2/x2)
+ else theta2=%pi-atan(abs(y2/x2))
+ end
+//output
+mprintf('case(i) V=3+j*7 is represented as V=%3.3f*e^(j*(%3.3f))\ncase(ii) V=-5+j*4 is represented as V=%3.3f*e^(j*(%3.3f))',r1,theta1,r2,theta2)
|