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 /2780/CH8/EX8.5/Ex8_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 '2780/CH8/EX8.5/Ex8_5.sce')
-rwxr-xr-x | 2780/CH8/EX8.5/Ex8_5.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/2780/CH8/EX8.5/Ex8_5.sce b/2780/CH8/EX8.5/Ex8_5.sce new file mode 100755 index 000000000..fc099e7e7 --- /dev/null +++ b/2780/CH8/EX8.5/Ex8_5.sce @@ -0,0 +1,12 @@ +clc
+//to calculate spacing of the crystal
+h=6.62*10^-34 //planck's constant in J-s
+m=9.1*10^-31 //mass of electron in kg
+V=344 //voltage in V
+e=1.6*10^-19
+lambda=h/sqrt(2*m*e*V) //wavelength in m
+//according to Bragg's law
+n=1
+//formula is 2*d*sintheta=n*lambda
+d=n*lambda/(2*sin(%pi/6))
+disp("the spacing of the crystal is d="+string(d)+"m")
|