10

How can we convert Latex representation into symbolic math.

For example,

A LaTex representation

y = \int x^2  

Has an equivalent symbolic math representation as

syms x
y = int(x*x, x)

Is there a function to perform this action? I know that there exists a function latex in matlab and I want the exact inverse of this function.

  • Not that I know of. If you find a tool, let us know because that would be sweet. – rayryeng Feb 02 '15 at 17:11
  • 1
    @rayryeng I tried searching but didn't find anything yet. If nothing shows up in two days I will try and write a function of my own. – Ankit Chiplunkar Feb 02 '15 at 17:24
  • 3
    After a bit of searching (for a number of languages) and contemplating, I didn't find anything and suspect such a tool doesn't exist, save [Mathematica](http://reference.wolfram.com/language/ref/format/LaTeX.html) (though I doubt the robustness of this for _actual_ documents). The lack of static grammar and an explicit macro-to-function rule list makes a general, robust program extremely difficult, if neigh impossible, to write given any TeX math input. So a simple, one-shot is probably your best bet. – TroyHaskin Feb 02 '15 at 17:31

1 Answers1

1

Matlab latex command converts matlab's syntax to latex's syntax. There is no function in matlab that parses LaTeX syntax into matlab's.

Your closest approximation to latex syntax inside Matlab is MuPAD.

bendervader
  • 2,619
  • 2
  • 19
  • 22