From bug-request at octave dot org Sat Apr 1 18:15:16 2006 Subject: Re: Problem with recent change to isvector and isscalar From: "William Poetra Yoga Hadisoeseno" To: David dot Bateman at motorola dot com Cc: bug at octave dot org, "Bill Denney" Date: Sun, 2 Apr 2006 08:13:40 +0800 On 4/2/06, David Bateman wrote: > The recent change that Bill made to the isvector and isscalar functions > causes a number of failed tests in the test suite. Perhaps it is the > test that is now wrong and not Bill's changes, but I find that the code > > s.a = 1; isvector(s) > ans = 1 > > rather strange and counter-intutitive behavior. I checked matlab and it > too returns 1 in this case. Can we change the sense of the related tests? > Actually I think Matlab views something as a 1x1 matrix. So the above struct should be a 1x1 matrix of struct type, thus it is a vector. Strange, but makes sense somehow. -- William Poetra Yoga Hadisoeseno ------------------------------------------------------------- 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 -------------------------------------------------------------