summaryrefslogtreecommitdiff
path: root/2606/CH6/EX6.16/ex6_16.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2606/CH6/EX6.16/ex6_16.sce
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 '2606/CH6/EX6.16/ex6_16.sce')
-rwxr-xr-x2606/CH6/EX6.16/ex6_16.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/2606/CH6/EX6.16/ex6_16.sce b/2606/CH6/EX6.16/ex6_16.sce
new file mode 100755
index 000000000..7eec4f642
--- /dev/null
+++ b/2606/CH6/EX6.16/ex6_16.sce
@@ -0,0 +1,21 @@
+//Page Number: 6.21
+//Example 6.16
+clc;
+//Given
+p=0.4;
+Pp=p;
+q=0.3;
+Pn=q;
+a=1; //i start value
+b=6; //i end value
+//(a)Probabilty that all pulses are positive
+s=1;
+for i=a:b
+ s=s*Pp;
+ end
+disp(s,'Probabilty that all pulses are positive:');
+
+//(b)Pulses are positive ,positive, positive, zero,zero,negative
+Pz=1-(p+q);
+s1=(Pp^3)*(Pz^2)*Pn;
+disp(s1,'Probabilty that all pulses are positive ,positive, positive, zero,zero,negative:');