From bug-request at octave dot org Fri Mar 24 18:12:22 2006 Subject: Re: isvector (again) From: Bill Denney To: William Poetra Yoga H cc: "John W. Eaton" , bug@octave.org Date: Fri, 24 Mar 2006 19:11:37 -0500 (EST) On Fri, 24 Mar 2006, William Poetra Yoga H wrote: > --- Bill Denney wrote: >> I really think that anything where (prod(size(x)) == max(size(x))) is a >> vector. > > Yes, I agree with this one. But somehow I don't like to use it for > checking whether a vector is a vector. I don't know (haven't checked > yet), but is > ((length(size(x)>1)==1)&&(length(size(x)==1)==(length(size(x))-1))) > faster than the above? I don't know if this method would be faster, but I do know that it's less readable (to me at least). Bill -- "When I was watching Predator I didn't think two members of its cast would become governors, either. So you never know." -- http://www.pointlesswasteoftime.com/film/scifi.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 -------------------------------------------------------------