summaryrefslogtreecommitdiff
path: root/3411/CH5/EX5.1/Ex5_1.sce
blob: 39caac475019c608a0ffc04885e136990a756884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)