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