MathGroup Archive 2007

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

Search the Archive

Select[ ] Woes: ÃÂÃÂSolved

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83127] Select[ ] Woes: ÃÂÃÂSolved
  • From: Bruce Colletti <vze269bv at verizon.net>
  • Date: Mon, 12 Nov 2007 05:13:34 -0500 (EST)

The code below answers my earlier posting.  Although the ratio of lists A and B looks like a list of rationals, FullForm reveals otherwise.  In turn, because it's not working with numbers, Select returns an empty list.

Bruce

A = {Item[3, Background -> Red], Item[4, Background -> Green]};
B = {Item[7, Background -> White], Item[10, Background -> Blue]};
x = A/B
FullForm[A/B]
Select[x, # > 0 &]

{3/7, 4/10}

List[Times[Item[3, Rule[Background, RGBColor[1, 0, 0]]], 
  Power[Item[7, Rule[Background, GrayLevel[1]]], -1]], 
 Times[Item[4, Rule[Background, RGBColor[0, 1, 0]]], 
  Power[Item[10, Rule[Background, RGBColor[0, 0, 1]]], -1]]]

{}


  • Prev by Date: Select[ ] Woes
  • Next by Date: Re: greetings and a question!
  • Previous by thread: Re: Select[ ] Woes
  • Next by thread: Dividers formatting in Grid