Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Operations /

Delete

FilledSmallSquare Delete[expr, n] deletes the element at position n in expr. If n is negative, the position is counted from the end.

FilledSmallSquare Delete[expr, i, j, ... ] deletes the part at position i, j, ... .

FilledSmallSquare Delete[expr, , , ... , , , ... , ... ] deletes parts at several positions.

FilledSmallSquare Example: Delete[a, b, c, d, 3] LongRightArrow.

FilledSmallSquare Delete[a, b, c, d, 1, 3] LongRightArrow.

FilledSmallSquare Deleting the head of a particular element in an expression is equivalent to applying FlattenAt to the expression at that point.

FilledSmallSquare Example: Delete[a, b, c, 2, 0] LongRightArrow.

FilledSmallSquare Deleting the head of a whole expression makes the head be Sequence.

FilledSmallSquare Example: Delete[a, b, 0] LongRightArrow.

FilledSmallSquare Delete works on SparseArray objects.

FilledSmallSquare See Section 1.8.6 and Section 2.4.2.

FilledSmallSquare See also: Insert, MapAt, ReplacePart, FlattenAt, DeleteCases, Drop, StringDrop.

FilledSmallSquare New in Version 2.

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.