From bug-octave-request at bevo dot che dot wisc dot edu Mon Nov 10 02:41:16 1997 Subject: Error in is_vector From: "John W. Eaton" To: "Jeffry T. Ross" Cc: "'bug-octave at bevo dot che dot wisc dot edu'" Date: Mon, 10 Nov 1997 02:41:37 -0600 On 30-Oct-1997, Jeffry T. Ross wrote: | I believe I found an inconsistency in Octave's is_vector and | nextpow2 functions in Octave version 2.0.5 | | In Octave, a applying is_vector to a scalar result in a true condition. | granted, a scalar can be considered vector of length 1. Yes, this is intentionaly, and not likely to change in future releases. | The problem arises when nextpow2.m uses is_vector and assumes that | it can distinguish between scalars and multi-dimensional vectors. In | nextpow2.m, if the input x is a scalar, it shouldn't be modified. If x is | a multi-dimensional vector, x should equal the length of x. Because of | the problem I mentioned above, all scalars are changed to 1. | | This problem appears to be fixed in Octave 2.0.9, so upgrading | is probably the best option. Yes, all the tests like this were (or at least should have been) changed so that they work. If you know of any that still have not been fixed in 2.0.9, please submit specific bug reports about them. Thanks, jwe