Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Lists and Matrices / Element Extraction /

Drop

FilledSmallSquare Drop[list, n] gives list with its first n elements dropped.

FilledSmallSquare Drop[list, -n] gives list with its last n elements dropped.

FilledSmallSquare Drop[list, n] gives list with its n element dropped.

FilledSmallSquare Drop[list, m, n] gives list with elements m through n dropped.

FilledSmallSquare Drop[list, m, n, s] gives list with elements m through n in steps of s dropped.

FilledSmallSquare Drop[list, , , ... ] gives a nested list in which elements specified by have been dropped at level i in list.

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

FilledSmallSquare Examples: Drop[a,b,c,d,e, 2] LongRightArrow.

FilledSmallSquare Drop[a,b,c,d,e, -3] LongRightArrow.

FilledSmallSquare Drop[Range[7], 2, 5, 2] LongRightArrow.

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

FilledSmallSquare Drop[list, , ] effectively drops all elements except those in a submatrix of list.

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

FilledSmallSquare Drop works on SparseArray objects.

FilledSmallSquare See Section 1.8.4 and Section 2.4.2.

FilledSmallSquare See also: Rest, Most, StringDrop, Take, Cases.

FilledSmallSquare Related package: LinearAlgebra`MatrixManipulation`.

FilledSmallSquare New in Version 1; modified in 4.

Further Examples



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.