Allin et al,
<quote>
Proper addition is of course commutative, but the "extended
addition" that I'm talking about here maybe is not. I tend to think
of the left-hand operand as the "posit", so to speak, and the
right-hand operand as the increment (or decrement, in the case of
subtraction). And I reckon I can attach a good sense to the case
where an m x n matrix is the posit and the increment or decrement is
a scalar (applied to all elements of the posit). But I feel queasy
about the case where the posit is a scalar value and the
increment/decrement is an m x n matrix. This seems a step too far.
This may become moot if we decide to tighten up and insist on the
dot operators, but I thought I'd just mention it.
</quote>
My first thought is that if the manual says (mxn) + scalar is allowed, then the order
shouldn't matter. Addition is addition. Plus (so to speak), the alternative you
suggest is afaik different from the treatments in Matlab, Gauss, etc. So I think if you
want to insist on left-vs-right positioning, that should be documented.
A second thought is that at least for me, the rigor you're suggesting would be another
stumbling block in switching completely from the above-mentioned programs to gretl.
It's one thing to say I can't add a 1xn matrix to a 1xn series, for example.
I've learned to be more careful about such things in gretl, but if now I have to start
worrying about which side of the + sign a scalar or matrix is on, well, that seems
excessive.
It makes more sense to me to insist on a dot operator any time you're combining a
matrix and scalar, but that wouldn't be my first choice.
fwiw,
PS
________________________________________
From: gretl-devel-bounces(a)lists.wfu.edu [gretl-devel-bounces(a)lists.wfu.edu] on behalf of
Allin Cottrell [cottrell(a)wfu.edu]
Sent: Sunday, September 25, 2011 5:21 PM
To: Gretl development
Subject: Re: [Gretl-devel] matrix multiplication question
On Sun, 25 Sep 2011, Allin Cottrell wrote:
A question came up lately regarding addition (or subtraction) of
an m x n matrix and a 1 x 1 matrix. The manual said that this was
permitted (with the 1 x 1 matrix being treated as a scalar, and
added to each element of the m x n one). But in fact it was
supported only if the m x n matrix was on the left; and I
responded to the report by enabling the case where the 1 x 1
matrix is on the left.
On more thought on this. Maybe I'm being irrational, but it seems to
me that the status quo ante was in a way more defensible than the
new, "more consistent" state of things.
Proper addition is of course commutative, but the "extended
addition" that I'm talking about here maybe is not. I tend to think
of the left-hand operand as the "posit", so to speak, and the
right-hand operand as the increment (or decrement, in the case of
subtraction). And I reckon I can attach a good sense to the case
where an m x n matrix is the posit and the increment or decrement is
a scalar (applied to all elements of the posit). But I feel queasy
about the case where the posit is a scalar value and the
increment/decrement is an m x n matrix. This seems a step too far.
This may become moot if we decide to tighten up and insist on the
dot operators, but I thought I'd just mention it.
Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel