From help-octave-request at bevo dot che dot wisc dot edu Thu Dec 18 15:54:14 2003 Subject: Re: "end" for row vectors From: "Henry F. Mollet" To: Ricardo Cervera , Octave_post Date: Thu, 18 Dec 2003 14:53:47 -0800 I believe newer versions of Octave, allow the use of end (I'm using 2.1.46 on Ma). Otherwise, you can use length(x). Henry octave:10> x=[1 2 3] x = 1 2 3 octave:11> x(end) ans = 3 octave:12> x(length(x)) ans = 3 on 12/18/03 12:51 PM, Ricardo Cervera at ricardo dot cervera at hispalinux dot es wrote: > Hello. > > I have some .m files I ran using matlab. The problem is that > they use > >> v(end) > > in order to get the last element of a row-vector, and that doesn't > seem to work on octave (version 2.1.35, debian package). Is there > a similar syntax in octave to do so? > > Thanks. > > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- ------------------------------------------------------------- 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 -------------------------------------------------------------