Um Schriften im Mathemodus von LaTeX zu setzen, kann der Interpreter vor dem Aufruf von matlab2tikz explizit gesetzt werden.
xlabel('$a+b$', 'interpreter', 'latex');
Eine andere Möglichkeit ist die matlab2tikz-Option parseStringsAsMath
auf true
zu setzen:
matlab2tikz('parseStringsAsMath', 'true')
Dies wirkt jedoch auf alle Strings und erzeugt die Warnung
Warning: ================================================================================ You are using the "parseStringsAsMath" parameter. This may produce undesirable string output. For full control over output strings please set the parameter "parseStrings" to false. ================================================================================
auch wenn parseStrings
= false
.
Daher wird diese Möglichkeit nicht empfohlen.