#!/bin/sh usage() { echo "usage: $0 [-f font] prefix frequency" 1>&2 exit 1 } font= term= output= while true; do case "$1" in -f) [ "$2" ] || usage shift font=$1 shift;; -p) [ "$2" ] || usage shift term="set term png" output="set output \"$1\"" shift;; *) break;; esac done [ "$2" ] || usage [ "$3" ] && usage prefix=$1 f=$2 ../fft -s 100 -d -w hamming 100 <./$prefix-$f >_tmp set `./norm _tmp` xm=$1.0 # sample number of y peak ym=$2 # magnitude of y peak n=$3 # total number of samples span=6.25 # ADC sample rate in MHz / decimation (100 MHz/16) gnuplot -persist <