From d511b34e67703f1fd0ff3f289a601a37397363c1 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 7 Sep 2012 16:53:22 +0000 Subject: [PATCH] Add zplot git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2568 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/zplot.f90 | 34 ++++++++++++++++++++++++++++++++++ mainwindow.cpp | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 libm65/zplot.f90 diff --git a/libm65/zplot.f90 b/libm65/zplot.f90 new file mode 100644 index 000000000..55aa3c6fa --- /dev/null +++ b/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 diff --git a/mainwindow.cpp b/mainwindow.cpp index 3a3c274f5..c9dff6150 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//-------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"