summaryrefslogtreecommitdiff
path: root/1709/CH5
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1709/CH5
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 '1709/CH5')
-rwxr-xr-x1709/CH5/EX5.1/5_1.sce11
-rwxr-xr-x1709/CH5/EX5.2/5_2.sce8
-rwxr-xr-x1709/CH5/EX5.3/5_3.sce8
-rwxr-xr-x1709/CH5/EX5.4/5_4.sce22
4 files changed, 49 insertions, 0 deletions
diff --git a/1709/CH5/EX5.1/5_1.sce b/1709/CH5/EX5.1/5_1.sce
new file mode 100755
index 000000000..b8a895431
--- /dev/null
+++ b/1709/CH5/EX5.1/5_1.sce
@@ -0,0 +1,11 @@
+clc
+//Initialization of variables
+N1=1
+N2=1
+N3=3
+N4=1
+//calculations
+N=N1+N2+N3+N4
+sig=factorial(N) /(factorial(N1) *factorial(N2)*factorial(N3)*factorial(N4))
+//results
+printf("No. of ways of arranging = %d ",sig)
diff --git a/1709/CH5/EX5.2/5_2.sce b/1709/CH5/EX5.2/5_2.sce
new file mode 100755
index 000000000..ae9a735d0
--- /dev/null
+++ b/1709/CH5/EX5.2/5_2.sce
@@ -0,0 +1,8 @@
+clc
+//Initialization of variables
+N=6
+g=4
+//calculations
+sig=factorial(g+N-1) /(factorial(g-1) *factorial(N))
+//results
+printf("No. of ways of arranging = %d ",sig)
diff --git a/1709/CH5/EX5.3/5_3.sce b/1709/CH5/EX5.3/5_3.sce
new file mode 100755
index 000000000..ab51f2793
--- /dev/null
+++ b/1709/CH5/EX5.3/5_3.sce
@@ -0,0 +1,8 @@
+clc
+//Initialization of variables
+N=6
+g=8
+//calculations
+sig=factorial(g) /(factorial(N) *factorial(g-N))
+//results
+printf("No. of ways = %d ",sig)
diff --git a/1709/CH5/EX5.4/5_4.sce b/1709/CH5/EX5.4/5_4.sce
new file mode 100755
index 000000000..14afd194f
--- /dev/null
+++ b/1709/CH5/EX5.4/5_4.sce
@@ -0,0 +1,22 @@
+clc
+//Initialization of variables
+N0=1
+//calculations
+N1=3/%e
+N2=6/%e^2
+N3=10/%e^3
+N=N0+N1+N2+N3
+ei=[0 1 2 3]
+eid=ei+1
+f0=N0/N
+f1=N1/N
+f2=N2/N
+f3=N3/N
+fi=[f0 f1 f2 f3]
+//results
+printf("fractional population of level 0 = %.3f",f0)
+printf(" \n fractional population of level 1 = %.3f",f1)
+printf(" \n fractional population of level 2 = %.3f",f2)
+printf(" \n fractional population of level 3 = %.3f",f3)
+xtitle('fractional populations vs Energy levels','Energy levels ei','fractional population Ni/N')
+bar(ei,fi,0.1)