MATLAB Answers

Importing Latex Code into Matlab Scripts

6 views (last 30 days)
David Slater
David Slater on 7 Jan 2020
Commented: Vladimir Sovkov on 8 Jan 2020
Is there an easy way to import Latex code into a Matlab script or live script?

  0 Comments

Sign in to comment.

Answers (1)

Vladimir Sovkov
Vladimir Sovkov on 7 Jan 2020
In live script, go to \insert\Equation\Latex equation or just press Cntrl+Shift+L or type your Latex equation embraced by $ symbols.

  3 Comments

David Slater
David Slater on 7 Jan 2020
Vladimir,
Thank you for your answer.
When I do this, a line of text appears, but how can I turn this into executable Matlab code?
David.
Vladimir Sovkov
Vladimir Sovkov on 8 Jan 2020
This is indeed a way of making a good-looking equation in the live script text mode. I am unaware of a simple method to convert it into the executable Matlab code. The syntax differ, hence, a retranslator though is possible in principle, would be a huge complicated system, and I do not think it has been created by anybody thus far.
Vladimir Sovkov
Vladimir Sovkov on 8 Jan 2020
The reverse operation is easier--a Matlab symbolic expression can be turned to a latex formular with the command "latex" in the Symbolic Math Toolbox.

Sign in to comment.

Sign in to answer this question.


Translated by