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 /24/DEPENDENCIES/quantum.sci | |
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 '24/DEPENDENCIES/quantum.sci')
-rwxr-xr-x | 24/DEPENDENCIES/quantum.sci | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/24/DEPENDENCIES/quantum.sci b/24/DEPENDENCIES/quantum.sci new file mode 100755 index 000000000..3dbfb762b --- /dev/null +++ b/24/DEPENDENCIES/quantum.sci @@ -0,0 +1,24 @@ +//Sone universal constant
+h = 6.62*10^-34 //in J.s
+c = 3*10^8 //in m/s
+Me = 9.11*10^-31 //in kg
+conv = 1.6*10^-19 //ev to Joule conversion factor
+
+//calculates the energy difference between the two Energy levels n1 & n2
+//M = mass of the particle
+//L = width of the region
+function [E] = Ediff(n2, n1, M, L)
+ E = (n2^2-n1^2)*h^2/(8*M*L^2)
+endfunction
+
+//calculates the palnck's wavelength
+//E = energy of the particle
+function [lambda] = wavelength(E)
+ lambda = h*c/E
+endfunction
+
+//calculates the palnck's energy
+//w = wavelength of the particle
+function [E] = Energy(w)
+ E = h*c/w
+endfunction
\ No newline at end of file |