How to convert latex representation to symbolic math?
Show older comments
How can we convert Latex representation into symbolic math.
For example,
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. But I want the exact inverse of it.
2 Comments
An
on 30 Dec 2017
did you ever find a solution to this?
John D'Errico
on 30 Dec 2017
There is not one.
Answers (1)
Walter Roberson
on 30 Dec 2017
1 vote
Use Wolfram Alpha to import the LaTex string as MATHEMATICA code and then to convert the MATHEMATICA code to MATLAB.
I make no promises at all for how well this will work.
3 Comments
An
on 31 Dec 2017
Sounds reasonable... I ended up comparing expressions copying from Mathematica as plain text into Matlab...
Aakash
on 26 Mar 2023
can someone send me an example code for doing this?
Thank you
Walter Roberson
on 26 Mar 2023
shows using Mathematica ToExpression function to convert LaTeX to Mathematica.
https://mathematica.stackexchange.com/questions/63603/problem-in-downloading-tomatlab-package/63613#63613 talks about a ToMatlab package.
Categories
Find more on LaTeX in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!