|
From: | JD Cole |
Subject: | Re: "end" for row vectors |
Date: | Thu, 18 Dec 2003 18:55:08 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
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.46on 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 address@hidden wrote:Hello. I have some .m files I ran using matlab. The problem is that they usev(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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |