help-octave
[Top][All Lists]
Advanced

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

Re: "end" as array index?


From: Laurent Jacques
Subject: Re: "end" as array index?
Date: Sun, 22 Dec 2002 15:02:16 +0100
User-agent: KMail/1.4.3

On Friday 20 December 2002 23:12, John W. Eaton wrote:
> On 20-Dec-2002, James Frye <address@hidden> wrote:
> | Got what is probably a real dumb newbie question: our lab has a bunch of
> | data analysis scripts written for Matlab.  I'm trying to get some of them
> | to work under Octave, even though I know next to nothing about Matlab.
> | The scripts have a mumber of instances of a construct like
> |
> |     temp (end-3:end) = 0;
>
> This is equivalent to
>
>   temp (length(temp)-3:length(temp)) = 0;
>
> jwe

Of course but the "end" writing is very useful, specially in matrices slicing.
Do you thing it's possible to implement that in the octave C++ sources ?
This "end" would refer to the size of the object in the selected dimension.

Laurent.
P.S. In fact I asked exactly the same question probably 9 months ago.



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