MathGroup Archive 2009

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

Search the Archive

Re: Help x-y pairs with rules


data = {{x^2, {x -> 2, x -> 3}}, {x^3, {x -> 5}}};

({x, First[#]} /. Partition[Last[#], 1]) & /@ data
{{{2, 4}, {3, 9}}, {{5, 125}}}


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  

From: dragec [mailto:culinovic at gmail.com] 

Please, help with this:

I have list like this, but bigger:
With one expression (function), always go one or more points (rules)

{{x^2, {x -> 2, x -> 3}}, {x^3, {x -> 5}}}

I would like results like this (pairs of x-y) but grouped in lists
according to expression(function):
{{2,2^2},{3,3^2}},{5^3}}

Please help with expression that compute this.

THX




  • Prev by Date: Re: Got a tip ?
  • Next by Date: Re: Help x-y pairs with rules
  • Previous by thread: Re: Help x-y pairs with rules
  • Next by thread: Re: Help x-y pairs with rules