On Mon, 15 Oct 2007, andreas.rosenblad(a)ltv.se wrote:
> svetosch at
gmx.net @ INTERNET skrev 2007-09-25 14:02:40 :
>
>> andreas.rosenblad at ltv.se schrieb:
>>
>>>
>>> If it is a missing feature, please do implement it, so that the the
>>> combined expression X = 1 & Y = 2 can be used for matrices
>>
>> I'm not against that feature, but note that you can do for example
>> ((x=1).*(y=2) = 1), or ((x=1)+(y=2) = 2).
>
>
> Yes, but it is more cumbersome and less intuitive. Especially since X = 1
&
> Y = 2 is allowed for scalars and data series, it should also be allowed
for
> matrices.
Is there any chance that Z = (X = 1 & Y = 2) will be allowed for matrices
too, considering that it is allowed for scalars and data series?
The truble is the OR operator. The output of (X=1) is a matrix; (Y=2) is
a matrix too. What should (X=1) | (Y=2) be? Concatenation or logical OR?
Perhaps for this kind of things we should introduce the ".&" and
".|"
operators.
In the meantime, I see nothing wrong with Sven's suggestion to use
(X=1) .* (Y=2).
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti