[Top][All Lists]

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

Re: defining types in m-files?

From: Andy Adler
Subject: Re: defining types in m-files?
Date: Wed, 27 Aug 2003 23:27:20 -0400 (EDT)

On Wed, 27 Aug 2003 address@hidden wrote:

> Has anyone done any work on defining new types from scripts?
> If not, is the Matlab API sufficient, or should we define our own?  I
> haven't seen any code in the wild which uses it, so I don't know
> that there is a compelling reason for compatibility.

Do you have a link which explains the Matlab API approach to
new types? Do you have any oppinions about what it does

I had assumend that this would be impossible, so I didn't try.
But it sure would be a nice feature to have. Especially if
it would be used in conjunction with something fairly object

I'm not looking for the inheritance part of OO, just the
encapsulation. I'd like to do:

>> obj.data1= 1;
>> obj.data2= 2;
>> obj.method1= inline('this.data1 + this.data2');
>> obj.method1
ans = 3

'this' refers to the current object, in this example.


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

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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