help-octave
[Top][All Lists]
Advanced

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

Re: class() and MATLAB compatibility


From: Paul Koufalas
Subject: Re: class() and MATLAB compatibility
Date: Thu, 11 May 2006 22:08:22 +0930
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

G'day Paul,

The upstream author, Christian Merkwirth, of the MATLAB package I'm
interested in, kindly wrote to me and is re-thinking porting his package
to Octave.

He might be interested in adding the missing class() capability / Matlab
compatibility to Octave to do it; and he's a far better C++ programmer
than I am, ;-)

I think what'll persuade him is if enough people are interested in his
package: It's called ENTOOL, see http://chopin.zet.agh.edu.pl/~wichtel/
and it can be used for ensemble regression modelling.

That said, he's also considering making it independent of software like
MATLAB and Octave through using Boost and MTL (?), but I'd personally
prefer to see it running on Octave using new class() capability and
making use of the existing MEX files via mex. I'm assuming that's the
easiest and quickest route.

I managed to compile all of the ENTOOL MEX files with help from a third
Paul (Kienzle).

Cheers,
Paul.




Paul Billings wrote:

>My understanding is that presently octave does not have support for user
>defined types in .m files.  You can achieve it through writing a .oct file,
>but it is a painful process (compared to how easy Matlab makes it).
>
>There has been talk of adding this capability to octave in a future version;
>the archives should have some mention of it.  I could be wrong, but I don't
>think there is anyone working on it at the moment.
>
>Paul
>
>
>  
>
>>-----Original Message-----
>>From: address@hidden
>>[mailto:address@hidden Behalf Of Paul Koufalas
>>Sent: Wednesday, April 19, 2006 10:18 PM
>>To: address@hidden
>>Subject: class() and MATLAB compatibility
>>
>>
>>G'day all.
>>
>>I have a 3rd party MATLAB toolbox that relies on user-defined classes.
>>
>>The following is an extract from the MATLAB help reference:
>>
>>1. obj = class(object)
>>
>>2. obj = class(s, 'class_name') creates an object of MATLAB class
>>'class_name' using structure s as a template. This syntax is valid only
>>in a function named class_name.m in a directory named @class_name (where
>>'class_name' is the same as the string passed in to class).
>>
>>3. obj = class(s, 'class_name', parent1, parent2, ...) creates an object
>>of MATLAB class 'class_name' that inherits the methods and fields of the
>>parent objects parent1, parent2, and so on. Structure s is used as a
>>template for the object.
>>
>>4. obj = class(struct([]), 'class_name', parent1, parent2, ...) creates
>>an object of MATLAB class 'class_name' that inherits the methods and
>>fields of the parent objects parent1, parent2, and so on. Specifying the
>>empty structure struct([]) as the first argument ensures that the object
>>created contains no fields other than those that are inherited from the
>>parent objects.
>>
>>My understanding is that Octave only supports form 1, at least in 2.1.71:
>>
>>octave:1> help class
>>class is a built-in function
>>
>> -- Built-in Function:  class (EXPR)
>>     Return the class of the expression EXPR, as a string.
>>
>>Most of the class() usage in this 3rd party MATLAB toolbox is of
>>the form 3.
>>
>>Does anyone have any ideas on how to proceed, or does this make it a
>>dead-end for using this toolbox under Octave? I understand the authors
>>of the toolbox did consider porting it to Octave, and stopped for this
>>reason (as well as for an invalid reason, i.e. perceived lack of cell
>>array support).
>>
>>Cheers
>>
>>
>>
>>_______________________________________________
>>Help-octave mailing list
>>address@hidden
>>https://www.cae.wisc.edu/mailman/listinfo/help-octave
>>    
>>
>
>  
>



reply via email to

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