Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Length of random index into list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74931] Re: Length of random index into list
  • From: "bitRAKE" <bitRAKE at gmail.com>
  • Date: Thu, 12 Apr 2007 04:44:12 -0400 (EDT)
  • References: <evd3sk$5iv$1@smc.vnet.net><evfkrj$77f$1@smc.vnet.net>

On Apr 10, 2:19 am, Jean-Marc Gulliet <jeanmarc.gull... at gmail.com>
wrote:
> bitRAKE wrote:
> > node = Length@Extract[s, indices]
>
> > How can this be done without using Extract?
>
> > Regards,
> > bitRAKE
>
> Does
>
> node = Length /@ s
>
> fit your needs?
>
> Or
>
> node = Length[s[[indices]]]
>
> Regards,
> Jean-Marc

I thought

node = Length[s[[indices]]]

would work, but indices is a List and I don't know how to remove the
head. My memory is fuzzy - it is like I remember reading how and I've
looked and searched. Hm...the nested list is highly irregular and
deeply nested - more like a vine than a tree.



  • Prev by Date: Question about Part
  • Next by Date: Re: Beginner--Help on Listing Values
  • Previous by thread: Re: Length of random index into list
  • Next by thread: Can Maximize return a function