Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9423 > unrolled thread
| Started by | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| First post | 2012-04-05 09:47 +0000 |
| Last post | 2012-04-05 09:47 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: addRule Bob Hanlon <hanlonr357@gmail.com> - 2012-04-05 09:47 +0000
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Date | 2012-04-05 09:47 +0000 |
| Subject | Re: addRule |
| Message-ID | <jljpod$cnf$1@smc.vnet.net> |
data = {{1, {38, 35, 37}}, {2, {21}}, {3, {24, 14}}};
Thread[Rule @@ #] & /@ data
{{1 -> 38, 1 -> 35, 1 -> 37}, {2 -> 21}, {3 -> 24, 3 -> 14}}
Bob Hanlon
On Wed, Apr 4, 2012 at 4:31 AM, clansa <dauphinester@gmail.com> wrote:
> Hello,
> I have these data
> {{1, {38, 35, 37}}, {2, {21}}, {3, {24, 14}}}
> and I want
> {[1->38,1->35,1->37},{2->21},{3->24,3->14}}
> The solution is simple when list of data have the same length
> But what is the solution for my example
> Thanks
>
> Andrew
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web