Previous Page Next Page Contents

linalg::ncols -- number of columns of a matrix

Introduction

linalg::ncols(A) returns the number of columns of the matrix A.

Call(s)

linalg::ncols(A)

Parameters

A - a matrix of a domain of category Cat::Matrix

Returns

a positive integer.

Related Functions

linalg::matdim, linalg::nrows, linalg::vecdim

Example 1

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  |
                             +-            -+

has four columns:

>> linalg::ncols(A)
                                     4




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000