Make DT=0 mean that the first full symbol starts at t=0.5s. Formerly DT=0 corresponded to the beginning of the ramp-up symbol. Fix a bug that caused signals with large DT to wrap around instead of truncating them.

This commit is contained in:
Steve Franke 2019-05-24 20:09:00 -05:00
parent 637d4d0411
commit 883c914d29

View File

@ -110,8 +110,10 @@ program ft4sim
c0((NN+1)*NSPS:(NN+2)*NSPS-1)=c0((NN+1)*NSPS:(NN+2)*NSPS-1)*(1.0+cos(twopi*(/(i,i=0,NSPS-1)/)/(2.0*NSPS) ))/2.0 c0((NN+1)*NSPS:(NN+2)*NSPS-1)=c0((NN+1)*NSPS:(NN+2)*NSPS-1)*(1.0+cos(twopi*(/(i,i=0,NSPS-1)/)/(2.0*NSPS) ))/2.0
c0((NN+2)*NSPS:)=0. c0((NN+2)*NSPS:)=0.
k=nint((xdt+0.5)/dt) k=nint((xdt+0.5)/dt)-NSPS
c0=cshift(c0,-k) c0=cshift(c0,-k)
if(k.gt.0) c0(0:k-1)=0.0
if(k.lt.0) c0(NZZ+k:NZZ-1)=0.0
do ifile=1,nfiles do ifile=1,nfiles
c=c0 c=c0