blob: b73a674273df1f28b80f2c1fbdf9ec965bef9202 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//example 4.13
//calculate maximum and minimum rainfall
clc;funcprot(0);
//given
N=20;
m=[1:1:20]; //rank number
rd=[82 78 75 72 70 68 65 63 61 58 56 54 52 50 46 40 36 34 32 30]; //rainfall in decresing order
for i=1:20
ri(i)=rd(21-i);
end
for i=1:20
T(i)=N/(m(i)-0.5);
end
//from the curves
mprintf("maximum rainfall=79cm for T=15 years.");
mprintf("\nminimum rainfall =31 cm for T=15 years.");
//graph is plotted between rd and T;ri and T
|