blob: 19c2c45705c0eb1825c06582702aa8711226ef51 (
plain) (
blame)
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
29
|
c subroutine smooth.f
c
c source
c Bevington, page 260.
c
c purpose
c smooth a set of data points by averaging adjacent channels
c
c usage
c call smooth (y, npts)
c
c description of parameters
c y - array of data points
c npts - number of data points
c
c subroutines and function subprograms required
c none
c
subroutine smooth (y,npts)
dimension y(1)
11 imax=npts-1
yi=y(1)
21 do 24 i=1,imax
ynew=(yi+2.*y(i)+y(i+1))/4.
yi=y(i)
24 y(i)=ynew
25 y(npts)=(yi+3.*y(npts))/4.
return
end
|