#! /bin/bash
#
matlab -nodisplay -nosplash -nodesktop -batch \
  "run('nile_histogram.m');exit;" > nile_histogram.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
#
gnuplot < nile_commands.txt
#
echo "Normal end of execution."
