Previous Page | Next Page

Language Reference

NROW Function

NROW( matrix ) ;

The NROW function returns the number of rows in its matrix argument. If the matrix has not been given a value, the NROW function returns a value of 0.

For example, following statements display the number of rows of the matrix m:

m = {1 2 3, 4 5 6, 3 2 1, 4 3 2, 5 4 3};
n = nrow(m);
print n;

Figure 23.196 Number of Rows in a Matrix
Test of NLPHQN subroutine: No Derivatives

n
5

Previous Page | Next Page | Top of Page