# String scalar or character vector must have valid interpreter syntax.

556 views (last 30 days)
Matthew Worker on 6 Apr 2020
Commented: Walter Roberson on 9 Jan 2023 at 8:08
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!

Guillaume on 6 Apr 2020
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 on 8 Jul 2021
my code it didnt classify
[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:
Salman Salamn on 4 Dec 2021
Could clarify what you are trying to do?

Nouman on 9 Jan 2023 at 7:53
Warning: Error updating Text.
Character vector must have valid interpreter syntax:
50(\10\0.3*pi/10)
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 9 Jan 2023 at 8:08
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

### Categories

Find more on Data Import and Export in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by