diff options
Diffstat (limited to '2087/CH4/EX4.14/example4_14.sce')
-rwxr-xr-x | 2087/CH4/EX4.14/example4_14.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/2087/CH4/EX4.14/example4_14.sce b/2087/CH4/EX4.14/example4_14.sce new file mode 100755 index 000000000..93958436b --- /dev/null +++ b/2087/CH4/EX4.14/example4_14.sce @@ -0,0 +1,26 @@ +
+
+//example 4.14
+//calculate daily lake evaporation
+//average evaporation for one week
+clc;funcprot(0);
+//given
+w=[12 5 2 -3 1 6 11]; //water added or taken out
+r=[0 6 8 12 9 5 0]; //rainfall
+for i=1:7
+ pan(i)=w(i)+r(i); //Pan evaporation
+ le(i)=0.8*pan(i); //lake evaporation
+end
+
+s=0;
+for i=1:7
+ s=s+le(i);
+end
+mprintf("daily lake evaporation(mm):");
+for i=1:7
+ mprintf("\n%f",le(i));
+end
+av=s/7;
+av=round(av*100)/100;
+mprintf("\n\naverage evaporation for one week=%f mm.",av);
+
|