summaryrefslogtreecommitdiff
path: root/1202/CH9
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1202/CH9
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 '1202/CH9')
-rwxr-xr-x1202/CH9/EX9.1/9_1.sce14
-rwxr-xr-x1202/CH9/EX9.2/9_2.sce36
-rwxr-xr-x1202/CH9/EX9.3/9_3.sce17
3 files changed, 67 insertions, 0 deletions
diff --git a/1202/CH9/EX9.1/9_1.sce b/1202/CH9/EX9.1/9_1.sce
new file mode 100755
index 000000000..922dac74b
--- /dev/null
+++ b/1202/CH9/EX9.1/9_1.sce
@@ -0,0 +1,14 @@
+clear
+clc
+
+//Example 9.1
+disp('Example 9.1')
+
+q1=12;//cub ft/min
+q2=6;
+q3=13;
+A=%pi*3^2;//ft^2
+delta_t=10;//min
+delta_h_max=delta_t*(q1+q2-q3)/A;
+
+mprintf('Alarm should be at least %f ft below top of tank',delta_h_max)
diff --git a/1202/CH9/EX9.2/9_2.sce b/1202/CH9/EX9.2/9_2.sce
new file mode 100755
index 000000000..76ef757ff
--- /dev/null
+++ b/1202/CH9/EX9.2/9_2.sce
@@ -0,0 +1,36 @@
+clear
+clc
+
+//Example 9.2
+disp('Example 9.2')
+
+mu=[0.5 0.8 0.2]; //population means of z y x
+S=[0.01 0.020 0.005];//population std dev of z y x
+
+z=[0.485]; //steady state values
+y=[0.825];
+x=0.205;
+
+F=4;D=2;B=2; //flow rates
+
+Ec=F*z-D*y-B*x;
+
+disp(Ec,"Ec=")
+
+sigma_Ec=sqrt(F^2*S(1)^2+D^2*S(2)^2+B^2*S(3)^2)
+
+disp(sigma_Ec,"sigma_Ec")
+
+
+
+Z=(Ec-0)/sigma_Ec;
+
+disp(Z,"Z=");
+
+[P,Q]=cdfnor("PQ",0.120,0,sigma_Ec);
+
+//Since P is close to 1, we use Q
+
+Probability=1-2*Q;
+
+disp(Probability,"Probability of abnormal event=")
diff --git a/1202/CH9/EX9.3/9_3.sce b/1202/CH9/EX9.3/9_3.sce
new file mode 100755
index 000000000..89b2cb6f1
--- /dev/null
+++ b/1202/CH9/EX9.3/9_3.sce
@@ -0,0 +1,17 @@
+
+clear
+clc
+
+//Example 9.3
+disp('Example 9.3')
+
+mu=[1.73 0.05 0.49 0.60 0.44]';//failures/yr
+R=exp(-mu);
+P=1-R;
+
+R_overall=prod(R);
+P_overall=1-R_overall;
+mu_overall=-log(R_overall);
+MTBF=1/mu_overall;
+
+mprintf("MTBF= %f yr",MTBF)