function tests_matlab(test_case)
% function to call tests from test_script.sh
try
   if verLessThan('matlab','8.5.0') 
    disp('gdat tests do not work for matlab version <8.5.0, skipping tests');
    passed = true;
   else
    fprintf('\n Running test file: %s\n',mfilename('fullpath'));
    fprintf('     Time: %s\n',datestr(now));
    passed = run_gdat_tests(test_case); % add a call to your test script here, with optional test_case input
   end 
   exit_code = int32(~passed); % convert to bash shell convention
catch ME
   disp(getReport(ME))
   exit_code = 1;
end
exit(exit_code);
