Top
Back: 5.1.82 names
Forward: 5.1.84 npars
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.83 ncols

Syntax:

ncols ( matrix_expression )
ncols ( intmat_expression )
ncols ( ideal_expression )

Type:

int

Purpose:

returns the number of columns of a matrix or an intmat or the number of given generators of the ideal, including zeros.

Note:

size(ideal) counts the number of generators which are different from zero. (Use nrows to get the number of rows of a given matrix or intmat.)

Example:
 
  ring r;
  matrix m[5][6];
  ncols(m);
→ 6
  ideal i=x,0,y;
  ncols(i);
→ 3
  size(i);
→ 2

See matrix; nrows; size.


Top Back: 5.1.82 names Forward: 5.1.84 npars FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.