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/CH40/EX40.3 | |
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/CH40/EX40.3')
-rwxr-xr-x | 24/CH40/EX40.3/Example40_3.sce | 12 | ||||
-rwxr-xr-x | 24/CH40/EX40.3/Example40_3_result.txt | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/24/CH40/EX40.3/Example40_3.sce b/24/CH40/EX40.3/Example40_3.sce new file mode 100755 index 000000000..3b3cf0196 --- /dev/null +++ b/24/CH40/EX40.3/Example40_3.sce @@ -0,0 +1,12 @@ +//Given that
+L = 100*10^-12 //in m
+
+//Sample Problem 40-3a
+printf("**Sample Prblem 40-3a**\n")
+P = integrate('2/L*(sin(%pi/L*x))^2', 'x', 0, L/3)
+printf("The probability is equal to %1.2f\n", P)
+
+//Sample Problem 40-3b
+printf("\n**Sample Prblem 40-3b**\n")
+P = integrate('2/L*(sin(%pi/L*x))^2', 'x', L/3, 2*L/3)
+printf("The probability is equal to %1.2f\n", P)
\ No newline at end of file diff --git a/24/CH40/EX40.3/Example40_3_result.txt b/24/CH40/EX40.3/Example40_3_result.txt new file mode 100755 index 000000000..f2f652da1 --- /dev/null +++ b/24/CH40/EX40.3/Example40_3_result.txt @@ -0,0 +1,5 @@ +**Sample Prblem 40-3a**
+The probability is equal to 0.20
+
+**Sample Prblem 40-3b**
+The probability is equal to 0.61
\ No newline at end of file |