I do not think that this would be a good move. Usually this binary op returns booleans (true/false or 1/0) in matlab. I think that we should be consistent with this behavior. You can get what you want with:
a(a.dates(find(a.data>0)))
We could implement something shorter like:
a(a>0)
We would need to overload >, <, >=, <= and to modifty the overloaded subsref method (so that we can index dseriesobjects with logical arrays). But all this would only make sense for dseries objects having only one variable, so I do not know if it's a good idea...
Yes, I misspoke in the initial message. I wanted the same functionality as in Matlab. To return a vector/matrix with all elements marked as 1 that are greater than 0. This is useful for a dseries with more than one variable
Yes, we can implement the comparison operators (a>0) for dseries objects with more than one variable, but I don't know what should return a(a>0) in this case (the returned true and false won't be, a priori, on the same rows for each variable).
That said, this will allow us to filter a dseries object with respect to the sign of one of the variables:
a(a.x>0)
or with respect to any rule applied on a variable
a(fun(a.x))
where funis a function returning a vector of booleans.