diff options
| author | Christoph Berg <myon@debian.org> | 2021-09-09 22:49:13 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-09-09 22:49:13 +0200 |
| commit | 7aa182cc9860464e41cc8b1ed7ea2419f70deb91 (patch) | |
| tree | ae7d07f023c64e3faca0b852d67209a205ab2998 /map65/libm65/zplot.f90 | |
| parent | 23a6b427e4bf791af53d91784c993b67f47e4635 (diff) | |
| parent | 85895feeaf88bcde26bbfc71e8f6b2047c0f5f41 (diff) | |
Update upstream source from tag 'upstream/2.5.0_rc6+repack'
Update to upstream version '2.5.0~rc6+repack'
with Debian dir b9d3381eb71d484f93fd73a092484a5814baf716
Diffstat (limited to 'map65/libm65/zplot.f90')
| -rw-r--r-- | map65/libm65/zplot.f90 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/map65/libm65/zplot.f90 b/map65/libm65/zplot.f90 new file mode 100644 index 00000000..55aa3c6f --- /dev/null +++ b/map65/libm65/zplot.f90 @@ -0,0 +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 |
