error using ezmeshc when using 'defaultte​xtinterpre​ter','late​x'

조회 수: 2 (최근 30일)
Nasser M. Abbasi
Nasser M. Abbasi 2016년 2월 1일
답변: Mike Garrity 2016년 2월 1일
any one knows why Matlab generates an error when using 'defaulttextinterpreter','latex' with "ezmesh" and friends? This below work OK
reset(0);
figure(1)
fh = @(u1,u2) u1-u2 ;
ezmeshc(fh,[-3,3,-3,3],30)
But now if I do
set(0,'defaulttextinterpreter','latex')
ezmeshc(fh,[-3,3,-3,3],30)
I get an error
Warning: Error updating Text.
String must have valid interpreter syntax:
{u_{1}}-{u_{2}}
Warning: Error updating Text.
String must have valid interpreter syntax:
{u_{1}}
Warning: Error updating Text.
String must have valid interpreter syntax:
{u_{2}}
This is on Matlab 2015a, windows 32 bit.
This error shows up also on same call to "ezmesh" and "ezsurfc". These functions seems to be confused with the setting of the title when using Latex interpreter. I have many plots, and I set set(0,'defaulttextinterpreter','latex') at the start of the code. I noticed only these ezmesh are only ones who do not like this settings.

답변 (1개)

Mike Garrity
Mike Garrity 2016년 2월 1일
The "EZ" functions make up nice titles and labels for you from the functions you give them. But they do that by generating TeX formatted strings. So when you set the default interpreter to LaTeX, it gets cranky about these strings that have the wrong formatting.
I'm afraid that I can't think of a great workaround. The input argument parsing of the "EZ" functions isn't very flexible, so it's hard to change their behavior.

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by