Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15124
| From | Themis Matsoukas <tmatsoukas@me.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Changing a list with the information of other |
| Date | 2013-07-03 22:05 +0000 |
| Message-ID | <kr2771$8uq$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Here is one way:
a = {{0, 1}, {1, w}, {2, 1 + w}, {3, 1 + 2 w}, {4, 2}, {5, 2 w}, {6,
2 + 2 w}, {7, 2 + w}};
b = {1, 1 + w, 2 + w, 2 w, 2, 2 + 2 w, 1 + 2 w, w};
Apply[#1 &,
Flatten[Table[Select[a, #[[2]] == b[[i]] &, 2], {i, 1, b // Length}],
1], 1]
{0, 2, 7, 5, 4, 6, 3, 1}
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Changing a list with the information of other Themis Matsoukas <tmatsoukas@me.com> - 2013-07-03 22:05 +0000
csiph-web