help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to determine if you are in octave or matlab


From: José Luis García Pallero
Subject: How to determine if you are in octave or matlab
Date: Tue, 1 May 2007 03:58:06 +0200

Hi,
I use a function that not exists in MatLab and the try catch statement to check if I'm running in GNU/Octave or in MatLab. My function looks like:

%check if it runs GNU/Octave or MatLab
%in: nothing
%out: 1 if I'm in GNU/Octave
%        0 if I'm in MatLab
function [inOctave] = in_octave()
try
    OCTAVE_VERSION;
    inOctave = 1;
catch
    inOctave = 0;
end


--
*****************************************
José Luis García Pallero
address@hidden
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
reply via email to

[Prev in Thread] Current Thread [Next in Thread]