Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: how to compact many maps?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70787] Re: how to compact many maps?
  • From: bghiggins at ucdavis.edu
  • Date: Fri, 27 Oct 2006 00:28:42 -0400 (EDT)
  • References: <ehplcu$j9g$1@smc.vnet.net>

Arek,

Try a replacement rule:

tab /. {x_Real, y_Real} -> {x, f[y]}

Cheers,

Brian


Arkadiusz.Majka at gmail.com wrote:
> Hi,
>
> For table of the following structure
>
> tab=Table[{Random[],Random[]},{10},{5}]
>
> I want to apply function f to the second argument of list.
>
> I did:
>
> (MapAt[f, #, 2] & /@ #) & /@ tab
>
> How can I do it in a simpler, more compact way?
> 
> Thanks,
> 
> Arek


  • Prev by Date: Re: how to compact many maps?
  • Next by Date: Re: how to compact many maps?
  • Previous by thread: Re: how to compact many maps?
  • Next by thread: Re: how to compact many maps?