~dricottone/filters

ref: 8479aea2db66090f2b0db01a1c42593975a3ba0e filters/plot.sh -rwxr-xr-x 389 bytes
8479aea2Dominic Ricottone Added rng package, convolve + kalman filters 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

tmpd="$(mktemp -d)"
trap 'rm -rf "${tmpd}"' EXIT

mkfifo "${tmpd}/f1"
rng uniform -m 5 -d 2 -n 100 \
	| tee "${tmpd}/f1" \
	| filter ab -i 100 -d 2 -a 0.2 -b 0.02 \
	| paste "${tmpd}/f1" - \
	| awk 'BEGIN{OFS="\t"; print "measurements", "estimates"} {print $1, $2}' \
	| gnuplot -p -e "set terminal dumb; set autoscale; plot '-' using 1:2 with lines notitle"

rm -rf "${tmpd}"