[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Distinguishing Octave from Matlab
From: |
Søren Hauberg |
Subject: |
Re: Distinguishing Octave from Matlab |
Date: |
Fri, 15 Feb 2008 11:25:40 +0100 |
fre, 15 02 2008 kl. 11:02 +0100, skrev David Bateman:
> A function that does what you want is
>
> function ret = isoctave ()
> persistent isoct
> if (isempty (isoct))
> isoct = exist('OCTAVE_VERSION') ~= 0;
> end
> ret = isoct;
> end
Is the 'exist' call really so slow that you need to use a persistent
variable? Wouldn't it be just as good to use
function ret = isoctave ()
ret = (exist('OCTAVE_VERSION') ~= 0);
endfunction
?
Søren
- Distinguishing Octave from Matlab, Primoz PETERLIN, 2008/02/15
- Re: Distinguishing Octave from Matlab, Ben Abbott, 2008/02/15
- Re: Distinguishing Octave from Matlab, David Bateman, 2008/02/15
- Re: Distinguishing Octave from Matlab, Ben Abbott, 2008/02/15
- Re: Distinguishing Octave from Matlab, David Bateman, 2008/02/15
- Re: Distinguishing Octave from Matlab, Ben Abbott, 2008/02/15
- Re: Distinguishing Octave from Matlab, Ben Abbott, 2008/02/15
- Re: [changeset: ver.m] Distinguishing Octave from Matlab, Ben Abbott, 2008/02/19