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