Line | |
---|
1 | subroutine interv (x,n,y,i) |
---|
2 | c---find the interval in the motonically increasing table |
---|
3 | c---of n elements starting in x(1) in which y is located. |
---|
4 | c---i is the index of the lower element of the table. |
---|
5 | c------------------------------------------------------------------------ |
---|
6 | c |
---|
7 | include 'ucom.h' |
---|
8 | c |
---|
9 | dimension x(n) |
---|
10 | c----------------------------------------------------------------------- |
---|
11 | c* |
---|
12 | m=1 |
---|
13 | if (n.lt.2) go to 20 |
---|
14 | do 10 j=2,n |
---|
15 | if (y.le.x(j)) go to 20 |
---|
16 | m=j |
---|
17 | 10 continue |
---|
18 | 20 continue |
---|
19 | i=m |
---|
20 | return |
---|
21 | end |
---|
22 | c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* |
---|
Note: See
TracBrowser
for help on using the repository browser.