[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use the OO features of Octave
From: |
John W. Eaton |
Subject: |
Re: How to use the OO features of Octave |
Date: |
Tue, 23 Sep 2008 17:14:42 -0400 |
On 23-Sep-2008, David Bateman wrote:
| David Bateman wrote:
| > John W. Eaton wrote:
| > >
| > > args(2) = num_indices;
| > > args(1) = index_position;
| > > args(0) = *indexed_object;
| >
| >
| > shouldn't args(1) be
| >
| > args(1) = index_position + 1;
| >
| > due to the 1-based indexing of Octave?
Yes, I've fixed this now. Thanks.
| Also shouldn't we subtract one from the return value of the feval call?
I don't think so, because the result is not used directly in C++, but
it replaces the value in the expression where the "end" keyword
appears. So in your example, for a(2:end) and a(2:4) to be
equivalent, the value returned from the __end__ function must be 4
(== numel(obj.x), I think), not 3.
jwe
- How to use the OO features of Octave, David Bateman, 2008/09/23
- How to use the OO features of Octave, John W. Eaton, 2008/09/23
- Re: How to use the OO features of Octave, David Bateman, 2008/09/23
- Re: How to use the OO features of Octave, David Bateman, 2008/09/23
- Re: How to use the OO features of Octave, John W. Eaton, 2008/09/23
- Re: How to use the OO features of Octave, David Bateman, 2008/09/23
- Re: How to use the OO features of Octave, John W. Eaton, 2008/09/23
- Message not available
- Re: How to use the OO features of Octave, David Bateman, 2008/09/23
- Re: How to use the OO features of Octave, David Bateman, 2008/09/23
- Re: How to use the OO features of Octave, John W. Eaton, 2008/09/23
- Re: How to use the OO features of Octave,
John W. Eaton <=
- Re: How to use the OO features of Octave, David Bateman, 2008/09/23
- Re: How to use the OO features of Octave, John W. Eaton, 2008/09/23
- Message not available
- Re: How to use the OO features of Octave, John W. Eaton, 2008/09/26