Commit 769a7f0e authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

added cosine wave

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4561
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 0d8f8361
......@@ -33,6 +33,7 @@ c 01/07/2002 V1.5 added test triangle
c 12/09/2007 V1.6 provide GSL random numbers
c 05/04/2011 V1.7 provide logarithmic sweep
c 20/04/2011 V1.8 provide better control for sweep
c 16/02/2012 V1.9 added cosine function
c
c==============================================================================
c
......@@ -261,6 +262,9 @@ c
print *,' f: initial frequency'
print *,' n: number of cycles per frequency decade'
print *,' '
print *,'16 cosine wave'
print *,' f(t)=a*cos(2*pi*f*t)'
print *,' '
print *,SIGGEN_CVS_ID
stop
endif
......@@ -697,6 +701,23 @@ c slope
do i=1,nsamples
series(i)=a*sin((g+log10(i*d+h))*2*pi*ncyc)
enddo
elseif (nsig.eq.16) then
if (verbose) then
print *,'cosine wave'
print *,'parameters:'
print 50,'amplitude','a',a,' '
print 50,'frequency','f',f,'Hz'
print 50,'sampling interval','d',d,'s'
print 50,'time series lentgh','T',t,'s'
endif
nsamples=int(t/d)
if (verbose) then
print *,'derived parameters:'
print 52,'number of samples',nsamples,' '
endif
do i=1,nsamples
series(i)=a*cos(2*pi*(i-1)*d*f)
enddo
else
stop 'ERROR: unknown signal'
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment