summaryrefslogtreecommitdiff
path: root/2087/CH4/EX4.44/example4_44.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2087/CH4/EX4.44/example4_44.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 '2087/CH4/EX4.44/example4_44.sce')
-rwxr-xr-x2087/CH4/EX4.44/example4_44.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/2087/CH4/EX4.44/example4_44.sce b/2087/CH4/EX4.44/example4_44.sce
new file mode 100755
index 000000000..8ecc69f93
--- /dev/null
+++ b/2087/CH4/EX4.44/example4_44.sce
@@ -0,0 +1,26 @@
+
+
+//example 4.44
+//calculate mean rainfall;additional guages needed
+clc;funcprot(0);
+//given
+p=[120 95 96 60 65 70 45 21]; //rain guage readings at respective stations
+s=0;
+for i=1:8
+ s=s+p(i);
+end
+pavg=s/8;
+u=0;
+for i=1:8
+ u=u+(p(i)-pavg)^2;
+end
+sx=(u/7)^0.5;
+Cv=sx*100/pavg;
+N=(Cv/13.99)^2;
+N=round(N*100)/100;
+mprintf("mean rainfall=%f cm.",pavg);
+mprintf("\ntotal stations needed=%f.",N);
+//taking N=10
+N=10;
+n=N-8;
+mprintf("\nadditional guages needed=%i.",n);