On Wed, 11 Jun 2014, Sven Schreiber wrote:
I have to think about whether I love or hate it, given that in
gretl/hansl a vector appears to be nothing than a special matrix and
therefore it is always clear whether it's a row or column (as opposed to
python-numpy for example, where people like to use 1-dim-arrays for
vectors, where the property row/column is undefined). But I guess this
can qualify as broadcasting behavior.
Constructs of this kind are rather common in matrix-oriented languages
such as gauss and ox.
Then I would expect that (m1 .* m2') would also work (will test,
have to
run now)...
Yes it would, but the it would do nothing special: a (column * row =
matrix) product is just ordinary matrix algebra, so you could omit the dot
and it would do he same thing. The nice thing is that (m1 ./ m2'), despite
being nothing short of heretical in proper matrix algebra, works as one
would expect it to. Where by "one" I mean anyone who ever played with
dollar signs in spreadsheets at least once in their life.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------