Method on @sym: pretty (x)
Method on @sym: s = pretty (x)
Method on @sym: s = pretty (x, 'unicode')
Method on @sym: s = pretty (x, 'ascii')

Return/display unicode/ascii-art representation of expression.

By default, this is similar to disp(x):

syms n
pretty (ceil (pi/n));
  -|   ⎡π⎤
  -|   ⎢─⎥
  -|   ⎢n⎥

However, if you set sympref display ascii, pretty(x) displays ascii-art instead. The optional second argument forces the output:

pretty (ceil (pi/n), 'ascii');
  -|          /pi\
  -|   ceiling|--|
  -|          \n /

This method might be useful if you usually prefer sympref display flat but occasionally want to pretty print an expression.

See also: @sym/disp, @sym/latex.

Package: symbolic