Often, it is convenient to alllow the program to determine the number of rows and columns in a matrix rather than explicitly specifying it. Functions NROW and NCOL respectively perform the desired task. For example, for a 2 by 3 matrix
the statements
row_in_b = nrow(b); col_in_b = ncol(b); print row_in_b, col_in_b;
respectively result in ROW_IN_B = 2 and COL_IN_B = 3.
3.144.254.231