Re: Changing a list with the information of other
- To: mathgroup at smc.vnet.net
- Subject: [mg131394] Re: Changing a list with the information of other
- From: "Louis Talman" <talmanl at gmail.com>
- Date: Wed, 3 Jul 2013 04:57:46 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
- References: <20130702044642.9CA146A4F@smc.vnet.net>
On Mon, 01 Jul 2013 22:46:42 -0600, Joaquim Nogueira <jen at fct.unl.pt>
wrote:
> {{0, 1}, {1, w}, {2, 1 + w}, {3, 1 + 2 w}, {4, 2}, {5, 2 w}, {6, 2 + 2
> w}, {7, 2 + w}}
Call your first list L, your second M.
Then do
L /. {a_, b_} :> Set[f[b],a];
followed by
Map[f, M]
--Louis A. Talman
Department of Mathematical and Computer Sciences
Metropolitan State University of Denver
<http://rowdy.msudenver.edu/~talmanl>
- References:
- Changing a list with the information of other
- From: Joaquim Nogueira <jen@fct.unl.pt>
- Changing a list with the information of other