Re: Check[] vs Off[] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg67197] Re: Check[] vs Off[] ?
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 11 Jun 2006 23:08:06 -0400 (EDT)
- References: <e6ge2h$nhn$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
AES schrieb:
> So, how can I suppress the printing of various error messages (like ones
> that say some particular evaluation produced an indeterminate result),
> while still using Check to replace the indeterminate (or otherwise
> erroneous) result with a chosen symbol, for example in a Table?
>
> For instance if evaluating myExpression sometimes produces an integer
> and sometimes an indeterminate result, then using
>
> myResult = Check[myExpression, "*"]
>
> helps make a Table column narrower than if it has to print out
> "Indeterminate" for each indeterminate result.
>
I would use Replace[]:
myExpr = {1, 2, Indeterminate, 3};
myResult = myExpr /. Indeterminate -> "*"
--> {1, 2, "*", 3}
Peter