diff --git a/matlab/updated_scripts/is_octave.m b/matlab/updated_scripts/is_octave.m new file mode 100644 index 0000000..bb44941 --- /dev/null +++ b/matlab/updated_scripts/is_octave.m @@ -0,0 +1,8 @@ +% Used to check if the script is running in Octave or MATLAB +% +% Logic is from https://stackoverflow.com/questions/2246579/how-do-i-detect-if-im-running-matlab-or-octave +% +% @return val True if the current script is running inside Octave, false if MATLAB +function [val] = is_octave() + val = exist('OCTAVE_VERSION', 'builtin') ~= 0; +end