Chapter 10: Matrices 238
matrixT
Accessing Matrix Dimensions with
Accessing Matrix Dimensions with Accessing Matrix Dimensions with
Accessing Matrix Dimensions with dim(
dim(dim(
dim(
dim( (dimension) returns a list containing the dimensions ({rows column s}) of matrix.
dim(matrix)
Note: dim(matrix)"Ln:Ln(1) returns the number of rows. dim(matrix)"Ln:Ln(2) returns the
number of columns.
Creating a Matrix with
Creating a Matrix with Creating a Matrix with
Creating a Matrix with dim(
dim(dim(
dim(
Use dim( with ¿ to create a new matrixname of dimensions rows ×columns with 0 as
each element.
{rows,columns}"dim(matrixname)