error using ezmeshc when using 'defaulttextinterpreter','latex'
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!