[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to program a new type
From: |
withaar |
Subject: |
Re: How to program a new type |
Date: |
Wed, 13 Nov 2002 10:36:59 -0800 |
Thank you for the suggestions, I will certainly study them.
I was thinking of making a generic type that can be created with
a command like:
afoo.num = [1 0 0 3] ;
afoo.den = [1 2 -2 -2 1] ;
afoo = class(afoo,'sys') ;
When I want to make a bode plot of such a system, I
migh want to specify a special function in
@sys/bode.m
which will be called with:
bode(sys)
This means that the method of object sys will be called
before the general version. Besides creating a generic type
with a custom type-name, it also needs a change in the
script execution mechanism in that the @sys/ path should
be scanned before other paths for a script to execute.
That _seems_ like a fairly uncomplicated modification, but
I have not familiarized myself with the code yet. I tought
I would start with seeing how easy it would be to do a
generic type.
On Tue, 12 Nov 2002 21:34:35 -0500 (EST), "Andy Adler"
<address@hidden> said:
> Two suggestions:
>
> 1. Look at examples/make_int.cc in the octave source.
> 2. Look at main/sparse/*.cc in octave-forge
>
> octave has great support for new types.
> What are you planning to do?
>
> Andy
> --
> Andy Adler,
> Assistant Professor, School of Information Technology and Engineering,
> University of Ottawa, Tel:1(613)562-5800 X 2345,
> Email:address@hidden
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------