[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: object behavior with Octave...
From: |
John W. Eaton |
Subject: |
Re: object behavior with Octave... |
Date: |
Sat, 14 Feb 2009 12:32:44 -0500 |
On 14-Feb-2009, Ben Abbott wrote:
| I'm not as familiar with Octave's objects as are others. You'll likely
| get much better more (and I expect better) information if your reply-
| all so that thread stays on the list.
|
| I haven't tried this, but I'd create a m-file function called
| create_ball.m and place all the contents below in it.
|
| function ball = create_ball ()
| ball.bounce = @bounce;
| ball.add_volume = @add_volume;
| ball.set_color = @set_color;
| endfunction
| function ret = bounce (varargins)
| ... bounce code here ...
| endfunction
| function ret = add_volumne (varargins)
| ... add the volume here ...
| endfunction
| function ret = set_color (varargins)
| ... set the color here ...
| endfunction
This is not really the way to do OOP in Octave.
jwe
- Re: development version does not compile, (continued)
- Re: development version does not compile, Bertrand Roessli, 2009/02/13
- Re: development version does not compile, John W. Eaton, 2009/02/13
- Re: development version does not compile, Bertrand Roessli, 2009/02/13
- Re: development version does not compile, John W. Eaton, 2009/02/13
- Re: development version does not compile, Bertrand Roessli, 2009/02/13
- object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Message not available
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Message not available
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Re: object behavior with Octave...,
John W. Eaton <=
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., Søren Hauberg, 2009/02/14
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., John W. Eaton, 2009/02/14
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Re: object behavior with Octave..., John W. Eaton, 2009/02/14
- Re: object behavior with Octave..., Sergei Steshenko, 2009/02/14