summaryrefslogtreecommitdiff
path: root/3733/CH2/EX2.3/Ex2_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '3733/CH2/EX2.3/Ex2_3.sce')
-rw-r--r--3733/CH2/EX2.3/Ex2_3.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/3733/CH2/EX2.3/Ex2_3.sce b/3733/CH2/EX2.3/Ex2_3.sce
new file mode 100644
index 000000000..f91a64469
--- /dev/null
+++ b/3733/CH2/EX2.3/Ex2_3.sce
@@ -0,0 +1,15 @@
+// Example 2_3
+clc;funcprot(0);
+//Given data
+D=[1 2 3 4 5 6 7];// Days
+F=[100 320 210 120 50 30 25];//Mean daily flow in m^3/sec
+
+//Calculation
+Tf=F(1)+F(2)+F(3)+F(4)+F(5)+F(6)+F(7);
+Tfv=24*3600*(Tf);// Total flow volume in m^3
+Tfv_1=Tfv/(10^6);// million-m^3
+Tfv_2=Tfv/86400;// day-sec-metre
+Tfv_3=Tfv/(3350*10^4);// cm
+Tfv_4=Tfv_1;// km^2-m as 1 km^2-m =1 million of cu-m.
+printf('\nTotal flow volume=%0.1f million-m^3 \nTotal flow volume =%0.1f day-sec-metre \nTotal flow volume=%0.1f cm \nTotal flow volum=%0.1f km^2-m',Tfv_1,Tfv_2,Tfv_3,Tfv_4);
+// The answer provided in the textbook is wrong