simplifying algebraic expressions with Null

*To*: mathgroup at smc.vnet.net*Subject*: [mg125089] simplifying algebraic expressions with Null*From*: Ramiro <ramiro.magno at gmail.com>*Date*: Tue, 21 Feb 2012 06:11:39 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

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.