diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
| commit | f647d78463c1250ce9c99af664615fafccf5e959 (patch) | |
| tree | 5b00428cef68aef1c9d407e2d4535687422419b6 /map65/libm65/averms.f90 | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'map65/libm65/averms.f90')
| -rw-r--r--[-rwxr-xr-x] | map65/libm65/averms.f90 | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/map65/libm65/averms.f90 b/map65/libm65/averms.f90 index d4f41846..904004c8 100755..100644 --- a/map65/libm65/averms.f90 +++ b/map65/libm65/averms.f90 @@ -1,20 +1,20 @@ -subroutine averms(x,n,nskip,ave,rms)
- real x(n)
- integer ipk(1)
-
- ns=0
- s=0.
- sq=0.
- ipk=maxloc(x)
- do i=1,n
- if(abs(i-ipk(1)).gt.nskip) then
- s=s + x(i)
- sq=sq + x(i)**2
- ns=ns+1
- endif
- enddo
- ave=s/ns
- rms=sqrt(sq/ns - ave*ave)
-
- return
-end subroutine averms
+subroutine averms(x,n,nskip,ave,rms) + real x(n) + integer ipk(1) + + ns=0 + s=0. + sq=0. + ipk=maxloc(x) + do i=1,n + if(abs(i-ipk(1)).gt.nskip) then + s=s + x(i) + sq=sq + x(i)**2 + ns=ns+1 + endif + enddo + ave=s/ns + rms=sqrt(sq/ns - ave*ave) + + return +end subroutine averms |
