MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: a list as an option
  • Next by Date: Re: Can Mathematica handle this TeX?
  • Previous by thread: Re:Thanks, mg67144: 3rd try!
  • Next by thread: Re: Check[] vs Off[] ?