help-octave
[Top][All Lists]
Advanced

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

Re: How to program a new type


From: John W. Eaton
Subject: Re: How to program a new type
Date: Wed, 13 Nov 2002 12:55:29 -0600

On 13-Nov-2002, withaar <address@hidden> wrote:

| 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.

These things might be useful features to have, but I'm told that the
Matlab class objects are not very good (I remember some people telling
me that Octave should not copy their design).

In any case, I'd suggest joining the octave-maintainers mailing list
and propose your changes there.  When you've studied the code enough
to have a general idea of how you plan to make your changes, explain
your plans to the list before making a big commitment to hacking up
the code.  If you do this first, your patches (which are likely to be
fairly large and affect a lot of existing code) will probably have a
better chance of being accepted.

Thanks,

jwe



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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