pretty - Pretty-print symbolic expressions

Syntax

pretty(S)

Description

The pretty function prints symbolic output in a format that resembles typeset mathematics.

pretty(S) prettyprints the symbolic matrix S using the default line width of 79.

Examples

The following statements

A = sym(pascal(2))
B = eig(A)
pretty(B)

return

A =
[1, 1]
[1, 2]

B =
[3/2+1/2*5^(1/2)]
[3/2-1/2*5^(1/2)]

                   [            1/2 ]
                   [ 3/2 + 1/2 5    ]
                   [                ]
                   [            1/2 ]
                   [ 3/2 - 1/2 5    ]
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS