Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Changing a list with the information of other
Replies: 7   Last Post: Jul 3, 2013 6:05 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Louis Talman

Posts: 4,463
Registered: 12/27/05
Re: Changing a list with the information of other
Posted: Jul 3, 2013 4:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Mon, 01 Jul 2013 22:46:42 -0600, Joaquim Nogueira <jen@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>




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.