Skip to main content
added 263 characters in body
Source Link
ubpdqn
  • 64.8k
  • 3
  • 65
  • 154

You could use TableForm, e.g.

col = CharacterRange["A", "E"];
row = CharacterRange["a", "e"];
TableForm[m, TableHeadings -> {row, col}]

A way using Grid:

Grid[{PadLeft[col, 6, ""]}~Join~
  MapThread[PadLeft[#1, 6, #2] &, {m, row}], 
 Dividers -> {{False, True, {False}}, {False, True, {False}}}]

enter image description here

enter image description here

You could use TableForm, e.g.

col = CharacterRange["A", "E"];
row = CharacterRange["a", "e"];
TableForm[m, TableHeadings -> {row, col}]

enter image description here

You could use TableForm, e.g.

col = CharacterRange["A", "E"];
row = CharacterRange["a", "e"];
TableForm[m, TableHeadings -> {row, col}]

A way using Grid:

Grid[{PadLeft[col, 6, ""]}~Join~
  MapThread[PadLeft[#1, 6, #2] &, {m, row}], 
 Dividers -> {{False, True, {False}}, {False, True, {False}}}]

enter image description here

enter image description here

Source Link
ubpdqn
  • 64.8k
  • 3
  • 65
  • 154

You could use TableForm, e.g.

col = CharacterRange["A", "E"];
row = CharacterRange["a", "e"];
TableForm[m, TableHeadings -> {row, col}]

enter image description here