latex - LaTeX representation of symbolic expression

Syntax

latex(S)

Description

latex(S) returns the LaTeX representation of the symbolic expression S.

Examples

The statements

syms x
f = taylor(log(1+x));
latex(f)

return

x-1/2\,{x}^{2}+1/3\,{x}^{3}-1/4\,{x}^{4}+1/5\,{x}^{5}

The statements

H = sym(hilb(3));
latex(H) 

return

\left [\begin {array}{ccc} 1&1/2&1/3\\\noalign{\medskip}1/2&1/
3&1/4
\\\noalign{\medskip}1/3&1/4&1/5\end {array}\right ]

The statements

syms alpha t
A = [alpha t alpha*t];
latex(A)

return

\left [\begin {array}{ccc} \alpha&t&\alpha\,t\end {array}\right ]

See Also

pretty, ccode, fortran

  


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