aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-06-01 23:17:48 +0200
committerWojtek Kosior <kwojtus@protonmail.com>2019-06-01 23:17:48 +0200
commite30d84903b99d395d4e4576b35d48ca8587e8a95 (patch)
treeab8dcaf1267e5ff81b0d2c9d37c4cce76166ff38
parent6c9fd37344df724417c1e19d863d3198104f1346 (diff)
downloadfortran-assignment2-e30d84903b99d395d4e4576b35d48ca8587e8a95.tar.gz
fortran-assignment2-e30d84903b99d395d4e4576b35d48ca8587e8a95.zip
add plotting of f2 (original + dft + filtered)
-rw-r--r--Makefile9
-rw-r--r--src/f2_dft.gnuplot5
-rw-r--r--src/f2_filtered.gnuplot3
-rw-r--r--src/f2_original.gnuplot3
4 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 95c1dad..2d9a5ea 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,15 @@ res/f1_original.txt : fourier
res/f1_dft.txt : fourier
./fourier f1 dft > res/f1_dft.txt
+res/f2_original.txt : fourier
+ ./fourier f2 > res/f2_original.txt
+
+res/f2_dft.txt : fourier
+ ./fourier f2 dft > res/f2_dft.txt
+
+res/f2_filtered.txt : fourier
+ ./fourier f2 filtered > res/f2_filtered.txt
+
res/%.png : src/%.gnuplot res/%.txt
gnuplot -c $<
diff --git a/src/f2_dft.gnuplot b/src/f2_dft.gnuplot
new file mode 100644
index 0000000..b2e9bb1
--- /dev/null
+++ b/src/f2_dft.gnuplot
@@ -0,0 +1,5 @@
+set terminal png size 1440, 900
+set output 'res/f2_dft.png'
+set logscale y
+set xrange [0:1000]
+plot 'res/f2_dft.txt' title 'dft' with lines \ No newline at end of file
diff --git a/src/f2_filtered.gnuplot b/src/f2_filtered.gnuplot
new file mode 100644
index 0000000..e0a7cce
--- /dev/null
+++ b/src/f2_filtered.gnuplot
@@ -0,0 +1,3 @@
+set terminal png size 1440, 900
+set output 'res/f2_filtered.png'
+plot 'res/f2_filtered.txt' title 'filtered' with lines \ No newline at end of file
diff --git a/src/f2_original.gnuplot b/src/f2_original.gnuplot
new file mode 100644
index 0000000..5d59ac1
--- /dev/null
+++ b/src/f2_original.gnuplot
@@ -0,0 +1,3 @@
+set terminal png size 1440, 900
+set output 'res/f2_original.png'
+plot 'res/f2_original.txt' title 'original' with lines \ No newline at end of file