In
http://lists.wfu.edu/pipermail/gretl-devel/2012-December/004176.html
I wrote:
<quote>
On Fri, 7 Dec 2012, Sven Schreiber wrote:
I just noticed that this:
matrix m = ones(1,1) | zeros(0,9)
actually works. I think gretl should complain instead,
because for concatenation one of the dimensions must match.
Fair enough. A related point is that, up till now,
"zeros(0,9)" didn't actually produce a 0 x 9 matrix, the
result was 0 x 0. That's now fixed in CVS, along with the
conformability question.
For row concatenation, '|', the two matrices must always have
the same number of columns, and for column concatenation, '~',
they must always have the same number of rows.
(Although I do retain a suspicion that it's not altogether
meaningful to say a matrix has 9 columns when it has zero
rows.)
</quote>
Sorry: Error, Fail! This "fix" broke things that are stated to
work in the manual (e.g. the ability to use a null matrix as
the basis for either row or column concatenation). I think
that's now put to rights in CVS.
Maybe not for right now, but... I tend to think that we should
not allow the construction of matrices like the one in Sven's
example above -- that is, with zero rows but a positive number
of columns or vice versa. You can have a proper null matrix,
or you can have a matrix with rows > 0 and cols > 0, but not a
chimera.
As I mentioned, doing "zeros(0,9)" would (silently) produce a
proper null matrix (0x0) until recently. That was not very
satisfactory and for the present I've left in place the "fix"
that produces a 0x9 matrix, but I think that shouldn't stand
for long. Thoughts?
Allin