How can we convert LaTeX representation to symbolic math functions in matlab?
Asked Answered
M

1

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.

Marola answered 2/2, 2015 at 16:32 Comment(3)
Not that I know of. If you find a tool, let us know because that would be sweet.Dyslexia
@Dyslexia 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.Marola
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 (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.Sheepfold
S
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.

Sussex answered 15/4, 2015 at 5:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.