Hello there,
First of all, I do hope this is sent to the correct address. If not, please either forward to the intended recipient (maintainer of Octave-Matlab compatibility issues list) or reply with more information; thank you!
I am developing a toolbox for Matlab (see
http://neuroelf.net/ if interested), and while I am aware that not the entire functionality will work in Octave (particularly the GUI components, I assume), I would like users who are familiar with working in a command line/prompt style environment to use as much of the functionality of my toolbox as possible, even without a Matlab license, for which Octave is the logical choice.
I only just started testing my code in Octave, and I already found several problems (and workarounds):
* cell2struct does not work with an empty cell (actually crashes Octave! i.e. to define a 0x0 struct with fieldnames set as an initialization for later use and ensuring all fieldnames are in their proper order); workaround: user defined function (attached) that depending on output of version('matlab') uses cell2struct or creates the struct as 1x1 and then removes the only element with s(:) = [];
* catch _expression_ does not work (as in try, TRYBLOCK; catch EXCEPTION, CATCHBLOCK; end); workaround, use an identifier (e.g. ne_eo), and define a function (attached) with the body "assignin('caller', 'ne_eo', lasterror);", which will never be called in Matlab but only in Octave
* transpose operator (') does not work for 1x1 struct arrays (which really is a strange bug! I'm using the syntax VARIABLE(:)' in some places in the code to ensure that the input can be used in a for ELEMENT = VARIABLE, CODE, end construction)
* the logical function does not support inputs of type uintXX/intXX, which again I think is a little odd...; workaround: use logical(double(VARIABLE));
Minor issues:
* the auto-complete (tab) key (at least on my Macs, OS 10.6), tend to do strange stuff when used with file or foldernames (e.g. when typing addpath followed by an absolute foldername, it does not correctly resolve subfolders, etc.), this is also true for the return value of fieldnames(OBJ) when used on a user defined object
I am likely to find additional problems and would appreciate if those would be taken care of in future versions :)
Best,
/jochen
--
Jochen Weber
Chief Software Engineer
NeuroElf.net444 Manhattan Avenue, Apt. 7F
New York City, NY-10026
USA
em:
address@hiddenph: +1-773-818-2561
gv: +1-773-234-8079