## `linalg::matdim` -- dimension of a matrix

#### Introduction

`linalg::matdim``(A)` returns the dimension of the matrix A, i.e., the number of rows and columns of A.

#### Call(s)

`linalg::matdim(A)`

#### Parameters

`A` | - | an m x n matrix of a domain of category `Cat::Matrix`

#### Returns

the list `[m, n]`, where `m` is the number of rows and `n` is the number of columns of `A`.

#### Related Functions

`linalg::vecdim`, `linalg::ncols`, `linalg::nrows`

#### Details

- `linalg::matdim` is an interface function for the method `"matdim"` of the matrix domain of `A`, i.e., instead of `linalg::matdim``(A)` one may call `A::dom::matdim(A)` directly.

#### Example 1

The dimension of the matrix:

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

                                 +-            -+
                                 |  1, 2, 3, 4  |
                                 |              |
                                 |  3, 1, 4, 0  |
                                 |              |
                                 |  5, 6, 0, 0  |
                                 +-            -+

can be determined by:

    >> linalg::matdim(A)

                                      [3, 4]

#### Changes

- used to be called `linalg::dimen`

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