diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /509/CH6/EX6.2/6_2.sci | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '509/CH6/EX6.2/6_2.sci')
-rw-r--r-- | 509/CH6/EX6.2/6_2.sci | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/509/CH6/EX6.2/6_2.sci b/509/CH6/EX6.2/6_2.sci new file mode 100644 index 000000000..824de17ff --- /dev/null +++ b/509/CH6/EX6.2/6_2.sci @@ -0,0 +1,30 @@ +//Chapter 6 Example 2//
+clc
+clear
+
+//total discharge during weeks=td//
+w1=500;w2=500;w3=350;w4=200;w5=300;w6=800;w7=1100;w8=900;w9=400;w10=200;
+// these are the weekly discharges respectively for 10 weeks//
+td=w1+w2+w3+w4+w5+w6+w7+w8+w9+w10;
+printf("\n Total Discharge = %.2f m^3/sec\n",td);
+//average weekly discharge=wd//
+wd=td/10;
+printf("\n Average weekly discharge = %.2f m^3/sec\n",wd);
+// to plot the hydrograph//
+x=[1,2,3,4,5,6,7,8,9,10];
+y=[500,500,350,200,300,800,1100,900,400,200];
+plot2d(x,y,style=2,rect=[0,0,10,1100]);
+xtitle("Hydrograph","Time(Weeks)","Q(m^3/sec)");
+xset('window',1);
+// to plot flow duration graph//
+a=[10,20,30,50,60,70,90,100];
+b=[1100,900,800,500,400,350,300,200];
+plot2d(a,b,style=3,rect=[0,0,100,1100]);
+xtitle("Flow duration curve","Percentage of time","Q(m^3/sec)");
+// to plot mass curve//
+xset('window',2);
+c=[1,2,3,4,5,6,7,8,9,10];
+d=[3500,7000,9450,10850,12950,18550,26250,32550,35350,36750];
+plot2d(c,d,style=4,rect=[0,0,10,40000]);
+xtitle("Mass Curve","Time(weeks)","Cumulative flow(day-sec-metre)");
+legend("Mass Curve","Ordinary Curve");
\ No newline at end of file |