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/CH42/EX42.4 | |
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/CH42/EX42.4')
-rwxr-xr-x | 24/CH42/EX42.4/Example42_4.sce | 17 | ||||
-rwxr-xr-x | 24/CH42/EX42.4/Example42_4_result.txt | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/24/CH42/EX42.4/Example42_4.sce b/24/CH42/EX42.4/Example42_4.sce new file mode 100755 index 000000000..69fe3dea5 --- /dev/null +++ b/24/CH42/EX42.4/Example42_4.sce @@ -0,0 +1,17 @@ +//Given that
+E = 0.10 //in ev
+T = 800 //in K
+k = 8.62*10^-5 //Boltzman constant
+
+//Sample Problem 42-4a
+txt = mopen('Example42_4_result.txt','wt')
+mfprintf(txt, '**Sample Problem 42-4a**\n')
+expo = E/(k*T)
+P = 1/(%e^expo + 1)
+mfprintf(txt, 'The probability of occupying the given energy state is equal to %f\n', P)
+
+//Sample Problem 42-4b
+Pbelow = 1/(1 + %e^-expo)
+mfprintf(txt, '\n**Sample Problem 42-4**\n')
+mfprintf(txt, 'The probability of occupying the given energy state is equal to %f', Pbelow)
+mclose(txt)
\ No newline at end of file diff --git a/24/CH42/EX42.4/Example42_4_result.txt b/24/CH42/EX42.4/Example42_4_result.txt new file mode 100755 index 000000000..12dd724e5 --- /dev/null +++ b/24/CH42/EX42.4/Example42_4_result.txt @@ -0,0 +1,5 @@ +**Sample Problem 42-4a**
+The probability of occupying the given energy state is equal to 0.189984
+
+**Sample Problem 42-4**
+The probability of occupying the given energy state is equal to 0.810016
\ No newline at end of file |