From bug-request at octave dot org Thu Dec 1 14:39:52 2005 Subject: rows and columns (functions) From: "John W. Eaton" To: William Poetra Yoga H Cc: bug at octave dot org Date: Thu, 1 Dec 2005 15:39:45 -0500 On 12-Nov-2005, William Poetra Yoga H wrote: | I find that rows() and columns() are a bit slow, so I saw how it's done: | | [nr, nc] = size (x); | | I found that this is about 20% faster: | | nr = size(x,1); | | And: | | nc = size(x,2); | | So why not use these instead? Probably because rows and columns were written before Octave's size command (or even Matlab's) accepted a DIM argument. | Even better, making them built-in functions would | speed up the whole thing, I think. Show me the code. :-) jwe ------------------------------------------------------------- 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 -------------------------------------------------------------