diff options
Diffstat (limited to '3870')
-rw-r--r-- | 3870/CH1/EX1.2/1_2.sce | 21 | ||||
-rw-r--r-- | 3870/CH1/EX1.2/ex1_2.png | bin | 0 -> 155001 bytes |
2 files changed, 21 insertions, 0 deletions
diff --git a/3870/CH1/EX1.2/1_2.sce b/3870/CH1/EX1.2/1_2.sce new file mode 100644 index 000000000..546c6babd --- /dev/null +++ b/3870/CH1/EX1.2/1_2.sce @@ -0,0 +1,21 @@ +//Developed in Windows 7 Operating system 64-bit
+//Platform Scilab 6.0.0
+clc;clear;
+//Example 1.2
+//Find the angle between the face diagonals of a cube
+
+//Given data
+a=[1 0 1]; // Vector A=1x^+0y^+1z^
+b=[0 1 1]; // Vector B=0x^+1y^+1z^
+amod=sqrt(a(1)^2+a(2)^2+a(3)^2);
+bmod=sqrt(b(1)^2+b(2)^2+b(3)^2);
+
+//Calculation
+c=a.*b;
+dot=0;
+for i=1:3
+ dot=dot+c(i);
+end
+theta=acosd(dot/(amod*bmod));
+
+disp(theta,'Angle(Dg.) betwen the face diagonals of a cube is : ')
diff --git a/3870/CH1/EX1.2/ex1_2.png b/3870/CH1/EX1.2/ex1_2.png Binary files differnew file mode 100644 index 000000000..cb84e835c --- /dev/null +++ b/3870/CH1/EX1.2/ex1_2.png |