Mathematica 9 is now available

Part (modified)Drop (modified)

Take

FilledSmallSquareTake[list, n] gives the first n elements of list.

FilledSmallSquareTake[list, -n] gives the last n elements of list.

FilledSmallSquareTake[list, m, n] gives elements m through n of list.

FilledSmallSquareTake[list, m, n, s] gives elements m through n in steps of s.

FilledSmallSquareTake[list, , , ... ] gives a nested list in which elements specified by are taken at level i in list.

FilledSmallSquareTake uses the standard sequence specification (see Section A.3.5).

FilledSmallSquare Examples: Take[a,b,c,d,e, 3] LongRightArrow.

FilledSmallSquareTake[a,b,c,d,e, -2] LongRightArrow.

FilledSmallSquareTake[Range[15], 3, 12, 4] LongRightArrow.

FilledSmallSquareTake can be used on an object with any head, not necessarily List.

FilledSmallSquareTake[list, , ] effectively extracts a submatrix from list.

FilledSmallSquare Example: Take[a,b,c,d,e,f, -1, 2] LongRightArrow.

FilledSmallSquare See The Mathematica Book: Section 1.8.4.

FilledSmallSquare See also: Part, Drop, StringTake, Select, Cases, Partition, PadLeft.

FilledSmallSquare Related package: LinearAlgebra`MatrixManipulation`.

Further Examples

Part (modified)Drop (modified)



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.