Selecting Rows Where All Columns Satisfy a Condition
- To: mathgroup at smc.vnet.net
- Subject: [mg82571] Selecting Rows Where All Columns Satisfy a Condition
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Thu, 25 Oct 2007 06:04:00 -0400 (EDT)
Hello everyone I've got an Nx4 numeric array called X. I'd like to pull out all rows where -9 does not appear in any of the four columns. I know I can this: Select[X, #[[1]] != -9 && #[[2]] != -9 && #[[3]] != -9 && #[[4]] != -9 &] But is there a more elegant way that applies the not-equal-to condition to each column without having to repeat it? Regards, Gregory