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 /854/CH1/EX1.2 | |
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 '854/CH1/EX1.2')
-rwxr-xr-x | 854/CH1/EX1.2/Example1_2.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/854/CH1/EX1.2/Example1_2.sce b/854/CH1/EX1.2/Example1_2.sce new file mode 100755 index 000000000..225fc4169 --- /dev/null +++ b/854/CH1/EX1.2/Example1_2.sce @@ -0,0 +1,23 @@ +//clear//
+//Caption: Program to find the phase angle between two vectors
+//Example1.2
+//page 11
+clc;
+Q = [4,5,2]; //point Q
+x = Q(1);
+y = Q(2);
+z = Q(3);
+G = [y,-2.5*x,3]; //vector field
+disp(G,'G(rQ) =')
+aN = [2/3,1/3,-2/3]; //unit vector- direction of Q
+G_dot_aN = dot(G,aN); //dot product of G and aN
+disp(G_dot_aN,'G.aN =')
+G_dot_aN_aN = G_dot_aN*aN;
+disp(G_dot_aN_aN,'(G.aN)aN=')
+teta_Ga = Phase_Angle(G,aN) //phase angle between G and unit vector aN
+disp(teta_Ga,'phase angle between G and unit vector aN in degrees =')
+//Result
+// G(rQ) = 5. - 10. 3.
+// G.aN = - 2.
+// (G.aN)aN = - 1.3333333 - 0.6666667 1.3333333
+// phase angle between G and unit vector aN in degrees = 99.956489
|