2.2.3.9.37 matrixbase::GetNumRows

Description

Get the number of rows in any matrixbase derived object (e.g. matrix, Matrix).

Syntax

int GetNumRows( )const

Parameters

Return

Returns the number of rows in this matrixbase object.

Examples

EX1

void matrixbase_GetNumRows_ex1()
{
    matrix mat(2,3) ={ 
        {11, 12, 13}, 
        {21, 22, 23}
    };
    int iNumRows;
    iNumRows = mat.GetNumRows(); // Demonstration of GetNumRows
    printf("  Given matrix:\n"                  "    11 12 13\n"                  "    21 22 23\n");
    printf("  The number of Rows = %d\n",iNumRows);
}

Remark

See Also

matrixbase::GetNumCols, matrixbase::SetSize

Header to Include

origin.h