Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

simplifying algebraic expressions with Null

8 views
Skip to first unread message

Ramiro

unread,
Feb 21, 2012, 6:13:42 AM2/21/12
to
Hi,

how to simplify an algebraic expression such that if a Null expression
is present then the whole algebraic expression gets simplified to
Null?
I'm using Null to represent missing data values. So after some
calculations on data with missing values (Null) I get expressions
involving Null. I'd like to simplify it to Null.
Example:

x=List[List[1,2],List[Plus[2,Null],3],List[4,5]];
Simplify x such that Plus[2,Null] gets replaced with Null, yielding,
lets say, y:
y=x // SpecialSimplification
List[List[1,2],List[Null,3],List[4,5]]

Obviously I'd want this to work on arrays, matrices, etc.. i.e.
applying the simplification up to the algebraic expression and not
further. I mean, I'd not want this to happen:
x=List[List[1,2],List[Plus[2,Null],3],List[4,5]];
y=x // SpecialSimplification
List[List[1,2],Null,List[4,5]]

or

x=List[List[1,2],List[Plus[2,Null],3],List[4,5]];
y=x // SpecialSimplification
Null

In other words, I'd like to be able to set the Null expression as the
absorbing element for any algebraic expression.

Thanks.

0 new messages