According to Ganesh Bikshandi <address@hidden> (on 07/23/04):
Hi,
I have two questions:
Is there a way to write classes in Octave,
Yes, and
like that in Matlab (using
@classname as a directory) ?
No.... There is no way in octave at the moment to do the overloading
necessary to create custom types from a dot-m file. There is no
subsref, subsasgn, etc function to perform this.
However, if you are really motivated it is possible to create a class
for octave as an oct-file. There are several examples of this within
the
octave-forge directories. There are complex classes for sparse, Galois
field and fixed point types in the directories main/sparse, main/comm
and main/fixed respectively. However if you want to learn how to create
your class the easiest example to look at is probably the one in
extra/linear-algebra/ov-re-tri.cc for upper/lower triangular matrices.
Note that only assignment and transpose/hermitian are defined on this
class, you'll have to check the other directories above if you want
to do something more complex.