Problem with "string scalar or character vector must have valid interpreter syntax"

18 ビュー (過去 30 日間)
Beatriz Sanchez
Beatriz Sanchez 2020 年 2 月 7 日
コメント済み: Walter Roberson 2020 年 2 月 7 日
Hello saviors,
so, I'm trying to do a subplot title with an annotation 'textbox', and I need it to be latex the interpreter of the text, right?
This is how I'm trying to do it:
% Title
annotation('textbox', [0.23, 0.5, 0.5, 0.5], 'String',...
'This is my Title','EdgeColor','none','interpreter','latex',...
'FontWeight','bold', 'FontSize',14);
But then, matlab gives me a warning:
"Warning: Error updating TextBox.
String scalar or character vector must have valid interpreter syntax"
and the figure's title comes out with the default interpreter.
Any idea of what am I doing wrong, or how to solve this issue?
  3 件のコメント
Beatriz Sanchez
Beatriz Sanchez 2020 年 2 月 7 日
oh! I forgot to tell
'$this is my title$'
does not works either :-(
matlab still shows me the warning and now my title has this $ simbols.
Walter Roberson
Walter Roberson 2020 年 2 月 7 日
It works for me when I try in R2019a.

サインインしてコメントする。

回答 (1 件)

Karthi Ramachandran
Karthi Ramachandran 2020 年 2 月 7 日
I tried whatever u have added , Its working fine, also latex is not required because you are just using string , if you want italics
'\it{This is my Title}' will do the work . Adding a $ symbol with latex interpeter wont leave space between words , as that will be treated as a math variables

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by