- #1
piJohn1411
- 1
- 0
Hi,
I was wondering if it's possible to colour the rows and columns of a matrix in mathematica.
I have received help from another forum and the code of my matrix is the following:
Rasterize@
Style[MatrixForm[{{n, -1 + n, -2 + n, \[CenterEllipsis], 1}, {2 n,
2 n - 1, 2 n - 2, \[CenterEllipsis], n + 1}, {3 n, 3 n - 1,
3 n - 2, \[CenterEllipsis],
2 n + 1}, {\[VerticalEllipsis], \[VerticalEllipsis], \
\[VerticalEllipsis], \[DescendingEllipsis], \[VerticalEllipsis]}, \
{n^2, -1 + n^2, -2 + n^2, \[CenterEllipsis],
HoldForm[(n - 1) n + 1]}},
TableAlignments -> {Center, Center}] // TraditionalForm, 30]
Thank you for your help.
I was wondering if it's possible to colour the rows and columns of a matrix in mathematica.
I have received help from another forum and the code of my matrix is the following:
Rasterize@
Style[MatrixForm[{{n, -1 + n, -2 + n, \[CenterEllipsis], 1}, {2 n,
2 n - 1, 2 n - 2, \[CenterEllipsis], n + 1}, {3 n, 3 n - 1,
3 n - 2, \[CenterEllipsis],
2 n + 1}, {\[VerticalEllipsis], \[VerticalEllipsis], \
\[VerticalEllipsis], \[DescendingEllipsis], \[VerticalEllipsis]}, \
{n^2, -1 + n^2, -2 + n^2, \[CenterEllipsis],
HoldForm[(n - 1) n + 1]}},
TableAlignments -> {Center, Center}] // TraditionalForm, 30]
Thank you for your help.