## `linalg::delRow` -- delete matrix rows

#### Introduction

`linalg::delRow``(A, r)` returns a copy of the matrix A in which the row with index r is deleted.

#### Call(s)

`linalg::delRow(A, r)`
`linalg::delRow(A, r1..r2)`
`linalg::delRow(A, list)`

#### Parameters

`A` | - | an m x n matrix of a domain of category `Cat::Matrix`
`r` | - | the row index: a positive integer <= m
`r1..r2` | - | a range of row indices (positive integers <= m)
`list` | - | a list of row indices (positive integers <= m)

#### Returns

a matrix of a domain of category `Cat::Matrix(R)`, where `R` is the component ring of `A`, or the void object of type `DOM_NULL`.

#### Related Functions

`linalg::col`, `linalg::delCol`, `linalg::row`

#### Details

- `linalg::delRow``(A, r1..r2)` deletes those rows whose indices are in the range `r1..r2`. If `r2 < r1` then the input matrix `A` is returned.
- `linalg::delRow``(A, list)` deletes those rows whose indices are contained in `list`.
- If all rows are deleted then the void object of type `DOM_NULL` is returned.

#### Example 1

We define the following matrix:

    >> A := matrix([[1, 2], [3, 4], [5, 6], [7, 8]])

                                    +-      -+
                                    |  1, 2  |
                                    |        |
                                    |  3, 4  |
                                    |        |
                                    |  5, 6  |
                                    |        |
                                    |  7, 8  |
                                    +-      -+

and illustrate the three different input formats for `linalg::delRow`:

    >> linalg::delRow(A, 2)

                                    +-      -+
                                    |  1, 2  |
                                    |        |
                                    |  5, 6  |
                                    |        |
                                    |  7, 8  |
                                    +-      -+

    >> linalg::delRow(A, [1, 4])

                                    +-      -+
                                    |  3, 4  |
                                    |        |
                                    |  5, 6  |
                                    +-      -+

    >> linalg::delRow(A, 2..4)

                                     +-    -+
                                     | 1, 2 |
                                     +-    -+

#### Changes

- If all rows are deleted then the void object of type `DOM_NULL` instead of the object `NIL` is returned.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000