MathGroup Archive 2005

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

Search the Archive

A NewBie Question


Is there a way to take parts of a list as follows:

takeParts[{a,b,c,d,e,f,g,h,i}, {2,3,4}]

{{a,b}, {c,d,e}, {f,g,h,i}}

A tedious way might be transforming {2, 3, 4} into {{1,2}, {3,5}, {6,
9}} (by Fold) and then Part/@ onto it. Is there a simpler way to do
it?

Thanks,
Hu Zhe


  • Prev by Date: Matrix Problem
  • Next by Date: Function Fitting To 3D Data
  • Previous by thread: Re: Problems with ExtendGraphics/Delaunay Triangulation
  • Next by thread: Re: A NewBie Question