1#!/bin/sh
2
3# Sample shell script to draw distribution of real eigenvalues using gnuplot
4# Make executable files and run the following command:
5#
6# > ./gunplot3.sh
7#
8
9
10# Check that the utility is present.
11
12type gnuplot >/dev/null 2>&1 || { echo >&2 "You need gnuplot to run the script. Aborting."; exit 1; }
13
14
15# Run test programs.
16
17srcdir=../test
18$srcdir/etest5 $srcdir/testmat.mtx evalues.mtx /dev/null /dev/null /dev/null -e si -ie ii -ss 100
19
20
21# Draw distribution of real eigenvalues.
22
23filename=evalues.mtx
24while read M N L B X; do
25    echo $M | grep -v '^%.*' > /dev/null
26    if [ $? -eq 0 ]; then
27	size=$M
28	break
29    fi
30done < $filename
31
32gnuplot -e "filename='$filename'; size='$size'" gnuplot3.plt
33
34rm evalues.mtx
35