diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
| commit | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (patch) | |
| tree | d702795f99ac38e0cc17e25f0f7e50fa3e05baf9 /map65/libm65/zplot.f90 | |
| parent | 310d05acf2c9233f7e336ae7dd9ffb7b54ca4e62 (diff) | |
New upstream version 3.0.0~rc1+repackupstream/3.0.0_rc1+repack
Diffstat (limited to 'map65/libm65/zplot.f90')
| -rwxr-xr-x | map65/libm65/zplot.f90 | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/map65/libm65/zplot.f90 b/map65/libm65/zplot.f90 index 55aa3c6f..a10c85c8 100755 --- a/map65/libm65/zplot.f90 +++ b/map65/libm65/zplot.f90 @@ -1,34 +1,34 @@ -subroutine zplot(amp,nz,jj,ave,rms) - - real amp(nz) - character*1 line(100),mark(0:6) - data mark/' ',' ','.','-','+','X','$'/ - - sum=0. - smax=0. - do i=1,nz - sum=sum+amp(i) - if(amp(i).gt.smax) then - smax=amp(i) - ipk=i - endif - enddo - ave=(sum-smax)/(nz-1) - sq=0. - do i=1,nz - if(i.ne.ipk) sq=sq+(amp(i)-ave)**2 - enddo - rms=sqrt(sq/(nz-2)) - - do i=1,nz - n=(amp(i)-ave)/rms -! n=(amp(i)-ave)/0.33 - if(n.lt.0) n=0 - if(n.gt.6) n=6 - line(i)=mark(n) - enddo - write(89,1010) jj,0.01*ave,0.01*rms,(line(i),i=1,nz) -1010 format(i3,2f6.1,1x,100a1) - - return -end subroutine zplot +subroutine zplot(amp,nz,jj,ave,rms)
+
+ real amp(nz)
+ character*1 line(100),mark(0:6)
+ data mark/' ',' ','.','-','+','X','$'/
+
+ sum=0.
+ smax=0.
+ do i=1,nz
+ sum=sum+amp(i)
+ if(amp(i).gt.smax) then
+ smax=amp(i)
+ ipk=i
+ endif
+ enddo
+ ave=(sum-smax)/(nz-1)
+ sq=0.
+ do i=1,nz
+ if(i.ne.ipk) sq=sq+(amp(i)-ave)**2
+ enddo
+ rms=sqrt(sq/(nz-2))
+
+ do i=1,nz
+ n=(amp(i)-ave)/rms
+! n=(amp(i)-ave)/0.33
+ if(n.lt.0) n=0
+ if(n.gt.6) n=6
+ line(i)=mark(n)
+ enddo
+ write(89,1010) jj,0.01*ave,0.01*rms,(line(i),i=1,nz)
+1010 format(i3,2f6.1,1x,100a1)
+
+ return
+end subroutine zplot
|
