blob: 6e8b94e17701c0cd5f8ae991d678db83fa306935 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//example 4.62
//ordinates of 1 hr unit hydrograph
clc;funcprot(0);
//given
t=[0:1:12]; //time
O=[0 0 54 0 175 0 127 0 58 0 25 0 0 0]; //ordinate of 2 hr unit hydrograph
of(1)=0;
of(2)=0;
for i=3:13
if modulo(i,2)==0;
of(i)=0;
else
of(i)=O(i-2)+of(i-2);
end
end
s=[0 25 54 120 229 300 356 390 414 430 439 439 439]; //Ordinates of S-curve
for i=2:13
of1(i)=s(i-1);
end
mprintf("ordinates of 1 hr unit hydrograph:");
for i=1:13
y(i)=s(i)-of1(i);
u(i)=y(i)*2;
mprintf("\n%i",u(i));
end
//graph is plotted between u and t
|