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 /2780/CH7/EX7.26 | |
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 '2780/CH7/EX7.26')
-rwxr-xr-x | 2780/CH7/EX7.26/Ex7_26.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/2780/CH7/EX7.26/Ex7_26.sce b/2780/CH7/EX7.26/Ex7_26.sce new file mode 100755 index 000000000..8e9c2fc23 --- /dev/null +++ b/2780/CH7/EX7.26/Ex7_26.sce @@ -0,0 +1,15 @@ +clc
+//to calculate probability
+x1=0.45 //x1=0.45*L
+x2=0.55 //x2=0.55*L
+n=1 //for ground state
+//formula is P=integrate('(2/L)*sin(n*%pi*x)^2),'x',x1,x2)
+P1=integrate('2*(sin(n*%pi*x)^2)','x',x1,x2)
+disp("P1="+string(P1)+"unitless")
+probability1=P1*100
+disp("probability for the ground states is probability1 ="+string(probability1)+"%")
+n=2 //for first excited state
+P2=integrate('2*(sin(n*%pi*x)^2)','x',x1,x2)
+disp("P2="+string(P2)+"unitless")
+probability2=P2*100
+disp("probability for first excited states is probability2="+string(probability2)+"%")
|