({{, (RefLink[TableDepth, paclet:ref/TableDepth])
is an option for (RefLink[TableForm, paclet:ref/TableForm]) and (RefLink[MatrixForm, paclet:ref/MatrixForm]) that specifies the maximum number of levels to be printed in tabular or matrix format. }})

OpenersNotesSection(Spacer1)Details

(RefLink[TableForm, paclet:ref/TableForm])[list,TableDepth->n] prints elements in list below level n as ordinary lists, rather than arranging them in tabular form.

With the default setting (RefLink[TableDepth, paclet:ref/TableDepth])->(RefLink[Infinity, paclet:ref/Infinity]), as many levels as possible are printed in tabular form. In (RefLink[TableForm, paclet:ref/TableForm]), the levels printed need not consist of elements with the same list structure. In (RefLink[MatrixForm, paclet:ref/MatrixForm]), they must.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Format a tensor of rank 3 as a table of lists:

TableForm[Array[a,{2,2,2}],TableDepth->2]

OpenersExampleSection1(Spacer1)Scope  (2)

Use with (RefLink[MatrixForm, paclet:ref/MatrixForm]):

MatrixForm[Array[(Subscript[a, ##])&,{2,2,2}],TableDepth->2]

Format rows of a matrix as lists:

MatrixForm[Array[(Subscript[a, ##])&,{2,3}],TableDepth->1]

Format the same matrix as a row vector of the rows:

MatrixForm[Array[(Subscript[a, ##])&,{2,3}],TableDepth->1,TableDirections->Row]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ArrayDepth, paclet:ref/ArrayDepth])  ▪  (RefLink[TableForm, paclet:ref/TableForm])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Tables and Matrices, paclet:tutorial/TablesAndMatrices])}})}})