On Tue, 14 Mar 2017, Sven Schreiber wrote:
Am 14.03.2017 um 15:55 schrieb Allin Cottrell:
> M = defarray(I(2), {1,2,3})
>
> will now work to give you an array of matrices without having to specify
> the "matrices" type.
Will this work?:
matrix a = {1; 2}
m = defarray(a'a)
I'm asking because sometimes gretl converts a 1x1 matrix to a scalar, and an
array of scalars isn't possible (because it's already covered by a matrix
type, of course).
Good question, but Yes, it works. An on-the-fly result of matrix
multiplication, such as a'a, remains of matrix type internally. It's
only on assignment that -- if it's 1 x 1 and no type has been
specified for the LHS -- we "cast" it to a scalar.
Allin