summaryrefslogtreecommitdiff
path: root/1646/CH3/EX3.6
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1646/CH3/EX3.6
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1646/CH3/EX3.6')
-rwxr-xr-x1646/CH3/EX3.6/Ch03Ex6.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/1646/CH3/EX3.6/Ch03Ex6.sce b/1646/CH3/EX3.6/Ch03Ex6.sce
new file mode 100755
index 000000000..7e00280bf
--- /dev/null
+++ b/1646/CH3/EX3.6/Ch03Ex6.sce
@@ -0,0 +1,15 @@
+// Scilab Code Ex3.6: Page:135 (2011)
+clc;clear;
+g1 = 4; // Intrinsic probability of first cell
+g2 = 2; // Intrinsic probability of second cell
+k = 2; // Number of cells
+n = 8; // Number of distinguishable particles
+n1 = 8; // Number of cells in first compartment
+n2 = n - n1; // Number of cells in second compartment
+W = factorial(n)*1/factorial(n1)*1/factorial(n2)*(g1)^n1*(g2)^n2;
+printf("\nThe thermodynamic probability of the macrostate (8,0) = %5d", W);
+
+// Result
+// The thermodynamic probability of the macrostate (8,0) = 65536
+
+