summaryrefslogtreecommitdiff
path: root/2087/CH4/EX4.3/example4_3.sce
blob: 040a7ef84339ad35efdfd1162d0dfe9f0c1ad3a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


//example 4.3
//calculate precipitation at x
clc;funcprot(0);
//given
pA=6.6;         //precipitation at A
pB=4.8;         //precpitation at B
pC=3.7;         //precipitation at C
nA=72.6;        //normal precipitation at A
nB=51.8;        //normal precipitation at B
nC=38.2;        //normal precipitation at C
nX=65.6;        //normal precipitation at X

pX=(nX*pA/nA+nX*pB/nB+nX*pC/nC)/3;
pX=round(pX*100)/100;
mprintf("precipitation at x=%f cm.",pX);