[Top][All Lists]

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

Re: Re: is octave compatible with matlab 5.2?

From: Jonathan King
Subject: Re: Re: is octave compatible with matlab 5.2?
Date: Tue, 23 Mar 1999 12:07:21 -0800

>>Thanks for replying so promptly!
>>> A better answer would require a bit more information on what you're
>>> looking for.
>>Well, I've developed a toolbox (for Bayesian networks) which makes
>>extensive use of multidimensional arrays and structures. Can octave
>>handle these? (I'm giving my toolbox away, but that doesn't help people
>>who don't already own matlab.)
>The main release of Octave (2.0.13) handles 1 and 2-d arrays and
>C-style data structures.  

I'm not quite sure I'd call them "C-style" exactly...  The
distinction is that matlab offers "structure arrays", which are
conceptually arrays of structures; even a "single" structure is just
a structure array with one item.

Now, if your toolbox uses just "single" structures, there's a real
chance that Octave could be compatible enough, in that you can do
things like:


a.c  # returns 'string'

in either.  (One brief point: Octave prints answers to structure
queries using the struct/field syntax (e.g., "a.c = string"
rather than Octave "ans = string", but that's the only difference)

>The bleeding edge releases additionally
>handle 1-d list data structures.  

Not sure what you mean by that; they're real lists and they can
contain lists.  So this works:

foo=list([1,2], list([3,4]))

But lists *are* bleeding edge; so far, I haven't found a way to get
stuff out of lists. :-(  so foo(2) in the above doesn't return a
list of one item.  Neither does foo(2)(1).

>From that, I'd say that your toolbox
>is MATLAB-dependent enough to require extensive rewriting for Octave
>use.  However, perhaps there are others on the list who'd be interested
>in working with you on the port to Octave.

The lack of multidimensional arrays could be a hassle.  I've written
to JWE about getting those implemented, and they are a project I'm
now trying to fund or do for my own reasons.  I think they would
turn out to be extremely useful, but thorough-going support for them
requires changes to a whole bunch of functions (lots of addtional
optional parameters for things, and coercion to/from 2-d matrices
for "standard" stuff, etc).


reply via email to

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