MathGroup Archive 2010

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

Search the Archive

Re: Generate #s

  • To: mathgroup at
  • Subject: [mg111010] Re: Generate #s
  • From: Bob Hanlon <hanlonr at>
  • Date: Fri, 16 Jul 2010 06:59:52 -0400 (EDT)

data = Array[x, 10]


example = {1, 5, 7, 9};



#[[example]] &[data]


Bob Hanlon

---- Francisco Gutierrez <fgutiers2002 at> wrote: 

Dear Group:
Suppose I have a list of ordered integers:
Based on it, I want to generate a list of the form:
{#[[1]], #[[5]],#[[7]],#[[9]]}
I tested with simple things like:
Table[#[[example[[i]]]], {i,1,Length[example]}]
to no avail.
How can I do it?

  • Prev by Date: Re: how to display the value of w after using do?
  • Next by Date: Re: local or global variables
  • Previous by thread: Generate #s
  • Next by thread: Re: Generate #s