Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Parts of Expressions >

MapAt

MapAt[f, expr, n]
applies f to the element at position n in expr. If n is negative, the position is counted from the end.
MapAt[f, expr, {i, j, ...}]
applies f to the part of expr at position {i, j, ...}.
MapAt[f, expr, {{i1, j1, ...}, {i2, j2, ...}, ...}]
applies f to parts of expr at several positions.
  • MapAt[f, expr, {i, j, ...}] or MapAt[f, expr, {{i, j, ...}}] applies f to the part expr[[i, j, ...]].
  • MapAt[f, expr, {{i1, j1, ...}, {i2, j2, ...}, ...}] applies f to parts expr[[i1, j1, ...]], expr[[i2, j2, ...]], ....  »
  • The list of positions used by MapAt is in the same form as is returned by the function Position.  »
  • MapAt applies f repeatedly to a particular part if that part is mentioned more than once in the list of positions.  »
New in 1
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team