Method on @sym: latex (x)
Method on @sym: s = latex (x)

Display or return LaTeX typesetting code for symbolic expression.

Example:

syms x
latex(sin(x/2))
  -| \sin{\left(\frac{x}{2} \right)}

A = [sym(1) 2; sym(3) 4];
s = latex(A)
  ⇒ s = \left[\begin{matrix}1 & 2\\3 & 4\end{matrix}\right]

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

Package: symbolic