String scalar or character vector must have valid interpreter syntax.

I want to add:
ylabel('$\midH(f)\mid$ (deg/m)', 'interpreter', 'latex')
error:
String scalar or character vector must have valid interpreter syntax.
let me know what to change to make it work,
Thanks!

回答 (3 件)

Guillaume
Guillaume 2020 年 4 月 6 日

3 投票

The error tells you the latex is invalid. Indeed it is, it's missing some spaces around the \mid
ylabel('$\mid H(f) \mid$ (deg/m)', 'interpreter', 'latex')
Suleman Asghar
Suleman Asghar 2021 年 7 月 8 日

0 投票

my code it didnt classify
a=imread('E:\dataset\Tomato___Bacterial_spot\16119e7a-b9d7-4004-9a07-45b6c9f6d480___UF.GRC_BS_Lab Leaf 9172_output.jpg')
[out,score]=classify(training,a);
figure,
imshow(a)
title(string(out))
it show error Warning: Error updating Text.
String scalar or character vector must have valid interpreter syntax:
Nouman
Nouman 2023 年 1 月 9 日

0 投票

Warning: Error updating Text.
Character vector must have valid interpreter syntax:
50(\10\0.3*pi/10)

2 件のコメント

Jan
Jan 2023 年 1 月 9 日
This is not an answer of the question. Please open a new thread for a new question and delete this message here. Thanks.
Walter Roberson
Walter Roberson 2023 年 1 月 9 日
tex and latex do not permit unescaped \ before a number. If for some strange reason you want literal \ inside the string use two \\ such as 50(\\10\\0.3*\pi/10)
But I have to wonder if the intention was to form a fraction with numerator or denominator of 10. If so use \frac

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

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

質問済み:

2020 年 4 月 6 日

コメント済み:

2023 年 1 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by