1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-17 19:49:41 +02:00

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
This commit is contained in:
Werner Almesberger 2010-11-29 01:10:23 -03:00
parent 404a0eea04
commit eafb2a226f
3 changed files with 20 additions and 2 deletions

11
usrp/doall Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash -x
opts=
while [ "$2" ]; do
opts="$opts $1"
shift
done
a=
for n in $1; do
a="$a `basename $n`=<(./evscan $n)"
done
eval ./plscan $opts $a

View File

@ -32,7 +32,7 @@ static void fft_complex(int n, const float *re, const float *im, double *res)
for (i = 0; i != n; i++) { for (i = 0; i != n; i++) {
a = hypot(out[i][0], out[i][1])/n; a = hypot(out[i][0], out[i][1])/n;
a = a*a; // a = a*a;
res[i] = a; res[i] = a;
} }
} }

View File

@ -24,7 +24,14 @@ set title "Received signal strength"
set data style errorlines set data style errorlines
plot \ plot \
`for n in $@; do `for n in $@; do
echo -n $comma \'$n\' title \'${n%.*}\' if [ "$n" = "${n#*=}" ]; then
file=$n
title=${n%.*}
else
file=${n#*=}
title=${n%%=*}
fi
echo -n $comma \'$file\' title \'$title\'
comma=, comma=,
done` done`
EOF EOF