From help-octave-request at bevo dot che dot wisc dot edu Thu Dec 18 19:26:04 2003 Subject: Re: "end" for row vectors From: JD Cole To: ricardo dot cervera at hispalinux dot es CC: help-octave at bevo dot che dot wisc dot edu Date: Thu, 18 Dec 2003 18:55:08 -0800 Of course if you're stuck in an older version, you could always use: octave:1> v = 1:10 v = 1 2 3 4 5 6 7 8 9 10 octave:4> v(size(v)(2)) ans = 10 Best, JD Henry F. Mollet wrote: > 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) >>> >> ------------------------------------------------------------- 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 -------------------------------------------------------------