3

I want to output in MatrixForm whenever I have a list/vector/matrix, but I do not want to have to type out the command each time.

How can I write one command at the beginning of the notebook so that all output is so formatted? (Also: generalization to any formatting would be better, with additional specific detail included for this case.)

Kuba
  • 136,707
  • 13
  • 279
  • 740
kevin
  • 43
  • 2

1 Answers1

3

You can use $Post:

$Post = If[ArrayQ@#, MatrixForm@#, #] &;

enter image description here

Kuba
  • 136,707
  • 13
  • 279
  • 740
  • Is this what you are after? – Kuba Apr 15 '14 at 08:13
  • I think that that will do just fine!  Thank you! (Could you explain what each part of that code does?  Mathematica Documentation can confuse me easily and I like to be able to have multiple sources of explanation for the code.) – kevin Apr 16 '14 at 00:55
  • @kevin There is not much there, what is that you have problems with? Have you seen $Post? – Kuba Apr 16 '14 at 06:16