Added script to tell if running in Octave or not

gr-droneid-3.8
David Protzman 2022-04-18 23:55:24 -04:00
rodzic 3c8a2f6ac0
commit 18ad927c9e
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -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