1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-16 21:19:43 +02:00
ben-wpan/usrp/plscan
Werner Almesberger eafb2a226f fix glitch in fft.c and add scripts to display data sets without temp file
- usrp/doall: new script to directly evaluate and plot data sets
- usrp/fft.c (fft_complex): don't square the magnitude
- usrp/plscan: if an argument name has the form title=name, use "name" as
  the file name and "title" as the title
2010-11-29 01:10:23 -03:00

38 lines
619 B
Bash
Executable File

#!/bin/sh
usage()
{
echo "usage: $0 [-o pngfile] file ..." 1>&2
exit 1
}
if [ "X$1" = X-o ]; then
out=$2
shift 2
fi
[ "$1" ] || usage
[ "${1#-}" = "$1" ] || usage
gnuplot -persist <<EOF
`[ "$out" ] && ( echo set term png\;; echo set output \'$out\'; )`
set xlabel "MHz"
set ylabel "dB"
set xrange [2402:2483]
set yrange [-35:-25]
set title "Received signal strength"
set data style errorlines
plot \
`for n in $@; do
if [ "$n" = "${n#*=}" ]; then
file=$n
title=${n%.*}
else
file=${n#*=}
title=${n%%=*}
fi
echo -n $comma \'$file\' title \'$title\'
comma=,
done`
EOF