help-octave
[Top][All Lists]
Advanced

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

Re: MAtlab and Octave same code for both


From: Joan Picanyol i Puig
Subject: Re: MAtlab and Octave same code for both
Date: Sat, 18 Jun 2005 14:15:49 +0200
User-agent: Mutt/1.5.9i

* SITI HAJAR A BAKAR <address@hidden> [20050618 00:34]:
> Im working on making a toolbox written in MATLAB, to be compatible in 
> both languages.
> There arent to many incompatibilities, so Im trying to avoid having to 
> maintain having two different code for the same toolbox in each 
> language. is that a way in Octave, of whether it can detect in what 
> program it is running in.

I've been using this to aid in debugging:

    if(exist('OCTAVE_VERSION'))
        old_silent_functions = silent_functions;
        silent_functions = 1;
    end

[...]

    if(exist('OCTAVE_VERSION'))
        silent_functions = old_silent_functions;
    end

together with ending my interesting lines with a ',' and do some sedding before
testing in Matlab (which doesn't know about silent_functions).

qvb
-- 
pica



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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