MathGroup Archive 2008

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

Search the Archive

Re: Color coding a Table entry

  • To: mathgroup at
  • Subject: [mg92649] Re: Color coding a Table entry
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Thu, 9 Oct 2008 06:37:50 -0400 (EDT)

I'm Printing (to the screen) a Table like, let's say,

   Table[{f1, f2, f3}, (x, xmin, xmax}]

and anytime the value of f2 goes negative I want that value printed in 

What's a simple, compact way to code this?

Try this (here random numbers instead of your terms are to be precise)

 Table[{f1, Style[ f2, If[f2 >= 0, Black, Red]],
    f3} /. {f1 -> RandomReal[],
    f2 -> (-1)^RandomInteger[]*RandomReal[], f3 -> RandomReal[]}, {i,
   0, 5}]]

Alexei Boulbitch, Dr., Habil.
Senior Scientist

ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern

Phone: +352 2454 2566
Fax:   +352 2454 3566


This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.

  • Prev by Date: Re: Color coding a Table entry
  • Next by Date: Re: Format Type of new Output Cells to OutputForm
  • Previous by thread: Re: Color coding a Table entry
  • Next by thread: Re: Color coding a Table entry