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 /2411/CH7/EX7.5/Ex7_5.sce | |
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 '2411/CH7/EX7.5/Ex7_5.sce')
-rwxr-xr-x | 2411/CH7/EX7.5/Ex7_5.sce | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/2411/CH7/EX7.5/Ex7_5.sce b/2411/CH7/EX7.5/Ex7_5.sce new file mode 100755 index 000000000..e53db0815 --- /dev/null +++ b/2411/CH7/EX7.5/Ex7_5.sce @@ -0,0 +1,14 @@ +// Scilab Code Ex7.5: Page-378 (2008)
+clc; clear;
+m = 2; n = 3; p = 6; // Coefficients of intercepts along three axes
+m_inv = 1/m; // Reciprocate the first coefficient
+n_inv = 1/n; // Reciprocate the second coefficient
+p_inv = 1/p; // Reciprocate the third coefficient
+mul_fact = double(lcm(int32([m,n,p]))); // Find l.c.m. of m,n and p
+m1 = m_inv*mul_fact; // Clear the first fraction
+m2 = n_inv*mul_fact; // Clear the second fraction
+m3 = p_inv*mul_fact; // Clear the third fraction
+printf("\nThe required miller indices are : (%d %d %d) ", m1,m2,m3);
+
+// Result
+// The required miller indices are : (3 2 1)
\ No newline at end of file |