aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-06-01 23:25:11 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-06-01 23:25:11 +0200
commit32104ec6b122ee4eccec1d4ed0cbc8f9d93df6d4 (patch)
tree6d343dee886530e7c28df2da1e29861f5cb972cd
parentfcdeac14961ddb47e85a64bad77b1168db6e9f82 (diff)
downloadfortran-assignment2-32104ec6b122ee4eccec1d4ed0cbc8f9d93df6d4.tar.gz
fortran-assignment2-32104ec6b122ee4eccec1d4ed0cbc8f9d93df6d4.zip
adjust noise, normalize
-rw-r--r--src/fourier.f903
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fourier.f90 b/src/fourier.f90
index 54ffb42..6766195 100644
--- a/src/fourier.f90
+++ b/src/fourier.f90
@@ -35,6 +35,7 @@ PROGRAM test
which_fun = .false.
call random_seed()
call random_number(randvals)
+ randvals = randvals / 50
ELSE
STOP "bad first argument (should be 'f1' or 'f2')"
END IF
@@ -96,6 +97,8 @@ PROGRAM test
call fftw_execute_dft_c2r(plan_b, arr_complex, arr_real)
+ arr_real = arr_real / npoints ! normalize
+
DO i = 1, npoints
write(*,*) (i - 1) * delta + start, " ", arr_real(i)