[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Distinguishing Octave from Matlab
From: |
Eric Chassande-Mottin |
Subject: |
Re: Distinguishing Octave from Matlab |
Date: |
Fri, 15 Feb 2008 11:33:20 +0100 |
look at this thread
http://www.nabble.com/How-to-determine-if-you-are-in-octave-or-matlab-tc10263625.html#a10290019
On Fri, Feb 15, 2008 at 10:33 AM, Primoz PETERLIN
<address@hidden> wrote:
> Hello everyone,
>
> I am sure this question has sprung up before, yet I am unable to find it in
> the archives. I am collaborating on a project with people using Matlab. The
> code is mostly portable, but there are a few quirks on one side or the
> other. The clumsy way which we are using now involves commenting out the
> Matlab code and uncommenting the Octave code on my side, while the guy on
> the other end performs the reverse process. What I would want to have is
> some way with which the script could automatically determine whether it is
> running in Octave or in Matlab, i.e., something like
>
> if (octave)
> % some octave code here
> else
> % equivalent matlab code here
> end
>
> Needless to say, it has to work on both ends. My closest match would be to
> use version() and some manually built-in knowledge (i.e., if the first
> character returned by version() is '2' or '3', we are likely to be running
> Octave, and if it is '7', we are likely to be running Matlab). Is there a
> more elegant way to do it?
>
> TIA, Primoz
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
>
- Re: Distinguishing Octave from Matlab, (continued)
- 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
- Re: [changeset: ver.m] Distinguishing Octave from Matlab, John W. Eaton, 2008/02/19
- Re: [changeset: ver.m] Distinguishing Octave from Matlab, Ben Abbott, 2008/02/19
- Re: [changeset: ver.m] Distinguishing Octave from Matlab, John W. Eaton, 2008/02/20
Re: Distinguishing Octave from Matlab,
Eric Chassande-Mottin <=