help-octave
[Top][All Lists]
Advanced

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

Re: User Defined Data Types


From: Alexander Barth
Subject: Re: User Defined Data Types
Date: Tue, 21 Apr 2015 13:17:23 +0200



On Mon, Apr 20, 2015 at 8:23 AM, shravan61 <address@hidden> wrote:
Hi,
    I am new to Octave. I want to define a new data type (For ex:
fixed-point data type).  I have searched the archive. There was only one
post related to User-defined data type in year 2000. Not much information
available in that post. After that there are no posts related to it.

May I know if there is a tutorial related to creating User-defined data
types. If not, it would be great if some one can reply to this post with
steps to follow to create User-defined data types.

Dear Shravan,

Have a look in the octave manual under object oriented programming:

https://www.gnu.org/software/octave/doc/interpreter/Object-Oriented-Programming.html#Object-Oriented-Programming

in particular in the operator overloading section:

https://www.gnu.org/software/octave/doc/interpreter/Operator-Overloading.html#Operator-Overloading

The "polynomial" example included in octave might also be helpful.
http://hg.savannah.gnu.org/hgweb/octave/file/82b4fb8b8a28/examples/code/%40polynomial

If performance is important, you might need to implement the class method in C++.

Best regards,
Alex



reply via email to

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