Skip to main content

Erase

Note

Working with polygons? See Erase (Geometry).

Erases an element of a list or vector.

Syntax

erase(List | Vector, Integer | List | Vector | Range)
erase(Matrix, Integer | List | Vector | Range)

Description

Given a list or vector L, and integers or sets of integers i1,...,in, erase the elements in LL at positions i1,...,ini_1, ..., i_n.

calc.erase1.calc.png

Given a matrix M, and two sets sets of integers i1,...,ini_1, ..., i_n and j1,...,jr, erase rows i1,...,ini_1, ..., i_n and columns j1,...,jrj_1, ..., j_r.

calc.erase2.calc.png