Define alternative latex-output for symbolic

조회 수: 1 (최근 30일)
William Alberg
William Alberg 2020년 5월 15일
답변: Nikhil Sonavane 2020년 5월 18일
Hello
I want to change the output that comes from the latex-command
syms g(f) dx(t) d
eq = dx(t) == g(t^2+t) + d; % example
latex(eq)
This example produces:
'\mathrm{dx}\left(t\right)=d+g\left(t^2+t\right)'
And i want it to say:
'\dot{x}(t)=d^{something}+g_{whatever}(t^2+t)'
Basicly, want tell matlab that the symbolic function "dx(t)" should be changed into "\dot{x}(t)" when using the latex command
I know that i can make a work-around and use strrep (or similar) to change '\mathrm{dx}' into '\dot{x}', but i would like to know if there is a more direct way

채택된 답변

Nikhil Sonavane
Nikhil Sonavane 2020년 5월 18일
There isn't a direct way to get the desired output. The only way is to make it work using the workaround you mentioned.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by