matlab equation to latex

조회 수: 10 (최근 30일)
ahmet akh
ahmet akh 2023년 4월 25일
댓글: Walter Roberson 2023년 5월 10일
Hello,
I am trying to convert a matlab equation to latex using a script like:
chr = latex(x^2 + 1/x)
The output is :'\frac{1}{x}+x^2'
Are there anyway to include '\displaystyle' before \frac
  댓글 수: 2
Nyemwerererai Matshaka
Nyemwerererai Matshaka 2023년 5월 10일
편집: Nyemwerererai Matshaka 2023년 5월 10일
can I have the code for conversion?
Walter Roberson
Walter Roberson 2023년 5월 10일
What are the rules about where the \displaystyle should be put in?
regexprep(chr, '\\frac', '\\displaystyle\\frac')

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2023년 4월 25일
The latex function does not have any option to add that in automatically, so you would need to use text manipulation to add it in.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by