summaryrefslogtreecommitdiff
path: root/3411/CH5/EX5.1/Ex5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3411/CH5/EX5.1/Ex5_1.sce')
-rw-r--r--3411/CH5/EX5.1/Ex5_1.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/3411/CH5/EX5.1/Ex5_1.sce b/3411/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..39caac475
--- /dev/null
+++ b/3411/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,24 @@
+//Example 5_1
+clc();
+clear;
+//To determine the miller indices of the plane
+//Given Intercepts are 2a,-3b,6c
+a=1
+b=1
+c=1
+intercepts1=2*a
+intercepts2=-3*b
+intercepts3=6*c
+unitcell1=intercepts1/a
+unitcell2=intercepts2/b
+unitcell3=intercepts3/c
+resiprocal1=1/unitcell1
+resiprocal2=1/unitcell2
+resiprocal3=1/unitcell3
+lcms=int32([unitcell1 unitcell2 unitcell3]);
+v=lcm(lcms)
+lcm1=3
+lcm2=-2
+lcm3=1
+printf("Co-ordinates of A,B,C are (%.2f,0,0),(0,%.1f,0)(0,0,%d)",1/lcm1,1/lcm2,lcm3)
+printf("\n Miller indices of the plane are(%d,%d,%d)",lcm1,lcm2,lcm3)