How do I detect if I am running Octave rather than Matlab?

January 11, 2011 in Octave, Recipes

Just use this snippet: isOctave = exist(‘OCTAVE_VERSION’) ~= 0; If isOctave is true then you are running Octave. See this discussion for more information.