|
From: | Søren Hauberg |
Subject: | Re: Overriding builtins |
Date: | Wed, 24 Jan 2007 11:10:10 +0100 |
User-agent: | Thunderbird 1.5.0.9 (X11/20070103) |
Jurgen Pletinckx skrev:
Octave 2.9.9+ and earlier releases in the 2.9.x series is matlab compatible. So I'm guessing that the best route for you is to upgrade to the development releases.Dear all, I am trying to get an existing Matlab codebase running on Octave (2.1.73). A first hurdle I face is the incompatibility between Octave's false (which returns a single boolean) and Matlabs false (which works like logical(zeros(args)), and can return multi-dimensional arrays).
Altering the existing scripts would work, obviously. So would patching data.cc. But it seems to me that overriding the built-in function (well, constant, actually) might be theI don't think you can overwrite keywords like "false" as I believe they are part of the language and not just functions (not sure on this, though). So I see two routes for you (others might see other routes)quickest way. Is that possible? If so, how do I go about it?
1) upgrade to the 2.9.x series, or2) change your scripts (this can be done in a matlab compatible way by using "zeros(n, 'logical')' instead of "false(n)").
Søren
Thanks,
[Prev in Thread] | Current Thread | [Next in Thread] |