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 /623/CH7 | |
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 '623/CH7')
-rwxr-xr-x | 623/CH7/EX2.6.1/U2_C6_1.sce | 9 | ||||
-rwxr-xr-x | 623/CH7/EX2.6.2/U2_C6_2.sce | 11 | ||||
-rwxr-xr-x | 623/CH7/EX2.6.3/U2_C6_3.sce | 10 |
3 files changed, 30 insertions, 0 deletions
diff --git a/623/CH7/EX2.6.1/U2_C6_1.sce b/623/CH7/EX2.6.1/U2_C6_1.sce new file mode 100755 index 000000000..ed44cd07e --- /dev/null +++ b/623/CH7/EX2.6.1/U2_C6_1.sce @@ -0,0 +1,9 @@ +//variable initialization
+x=(1/3):.01:(2/3);
+x0=1/3;
+x1=2/3;
+
+//calculation
+P=2*integrate('(sin(%pi*x))^2','x',x0,x1);
+
+printf("The required probability = %.2f",P);
diff --git a/623/CH7/EX2.6.2/U2_C6_2.sce b/623/CH7/EX2.6.2/U2_C6_2.sce new file mode 100755 index 000000000..f64d6fe6a --- /dev/null +++ b/623/CH7/EX2.6.2/U2_C6_2.sce @@ -0,0 +1,11 @@ +//variable initialization
+x=0:.001:(1/3);
+y=0:.001:(1/3);
+x0=0;
+x1=1/3;
+y0=0;
+y1=1/3;
+
+p=4*integrate('(sin(%pi*x))^2','x',x0,x1)*integrate('(sin(%pi*y))^2','y',y0,y1);
+
+printf("The required probability = %.2f",p);
diff --git a/623/CH7/EX2.6.3/U2_C6_3.sce b/623/CH7/EX2.6.3/U2_C6_3.sce new file mode 100755 index 000000000..f5108dbb8 --- /dev/null +++ b/623/CH7/EX2.6.3/U2_C6_3.sce @@ -0,0 +1,10 @@ +//variable initialization
+L = 10;
+n = 2;
+
+//Calculation
+X = L/2;
+X_square = ((L^2)/3)-((L^2)/(2*(n^2)*(3.14^2)));
+
+printf("\nExpectation of X = %.2f",X);
+printf("\nExpectation of X^2 = %.2f",X_square);
|