1 %% Taken from the GNU Octave Manual, (c) 1996-2016 John W. Eaton
2 %% https://octave.org/doc/v4.0.3/How-to-distinguish-between-Octave-and-Matlab_003f.html
5 %% Return: true if the environment is Octave.
7 function retval = isOctave
8 persistent cacheval; % speeds up repeated calls
11 cacheval = (exist ("OCTAVE_VERSION", "builtin") > 0);