how do I write an equation from matlab to latex?

I have a long differential not linear equation written in Matlab and i want to visualize it in lateX but I don't know how to do it. Do you have any suggests? Thanks

Respuestas (1)

Star Strider
Star Strider el 1 de Mayo de 2023
If you have the Symbolic Math Toolbox, use the latex function.

3 comentarios

thank you, but it seems wrong.. Is it possible? I mean the latex function gaves me a different equation but I'm sure that the one I write is right
syms f(x)
df = diff(f);
d2f = diff(df);
eqn = d2f == df^2 - f + 1
eqn(x) = 
L = latex(eqn)
L = '\frac{\partial ^2}{\partial x^2} f\left(x\right)={\left(\frac{\partial }{\partial x} f\left(x\right)\right)}^2-f\left(x\right)+1'
Entering that string into the latex editor here in Answers gives
which is the same as was displayed.
Star Strider
Star Strider el 1 de Mayo de 2023
@Walter Roberson — Thank you!

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 1 de Mayo de 2023

Comentada:

el 1 de Mayo de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by