MathGroup Archive 2007

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

Search the Archive

Re: Length of random index into list


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