필터 지우기
필터 지우기

TeX markup ignored by Matlab?

조회 수: 10 (최근 30일)
francesco capirci
francesco capirci 2018년 4월 27일
댓글: Kevin Joshi 2020년 6월 1일
I'm trying to format a prompt text using the TeX markup. This always worked with my old Matlab version (r2016a) but recently i updated to r2018a. Since then any time i try a modifier or a character sequence, it gets printed as is: for example, \pi is printed as "\pi" with the backslash included. Same goes with modifiers like ^{} and _{}. Even my old codes, which used to work, don't anymore. Any ideas?
  댓글 수: 2
Holden Tranquillo
Holden Tranquillo 2020년 4월 29일
I'm having the same issue
BAHIDJ Ryadh
BAHIDJ Ryadh 2020년 6월 1일
Try adding the parameters 'interpreter', 'tex' for commands like title, xlabel ... etc. MATLAB command line however doesn't support tex/LaTex Markup or greek characters according to Mathworks support because of the character set it is using.

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

답변 (1개)

Kevin Joshi
Kevin Joshi 2020년 6월 1일
Please use this as plot lables
clc;
clear all;
x = 1:100
y = rand(1,100)
plot(x,y)
xlabel({'\pi'},'interpreter','tex')
ylabel({'{\pi_{j}^{k}}'},'interpreter','tex')
  댓글 수: 1
Kevin Joshi
Kevin Joshi 2020년 6월 1일
Created using Matlab R2020a

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

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by