**[M-5] rows()** -- Number of rows and number of columns

__Syntax__

*real scalar* **rows(***transmorphic matrix P***)**

*real scalar* **cols(***transmorphic matrix P***)**

*real scalar* **length(***transmorphic matrix P***)**

__Description__

**rows(***P***)** returns the number of rows of *P*.

**cols(***P***)** returns the number of columns of *P*.

**length(***P***)** returns **rows(***P***)*****cols(***P***)**.

__Remarks__

**length(***P***)** is typically used with vectors, as in

**for (i=1; i<=length(x); i++) {**
... **x[i]** ...
**}**

__Conformability__

**rows(***P***)**, **cols(***P***)**, **length(***P***)**:
*P*: *r* *x* *c*
*result*: 1 *x* 1

__Diagnostics__

**rows(***P***)**, **cols(***P***)**, and **length(***P***)** return a result that is greater than or
equal to zero.

__Source code__

Functions are built in.