Reputation: 19870
I need to put word "naïve" on a plot, and save it as PNG and PDF. Sometime it's in a title, or in tick label. Whatever I've tried I always get right arrow symbol (png) or empty space (pdf) instead of the ï
character.
I've looked into functions native2unicode and unicode2native, but they seems to be only for file input/output.
I cannot believe this task is so difficult in MATLAB.
I'm using MATLAB 2012b undier Windows 7.
The symbol ï
has ascii code 0239
, or hex 0xEF
. MATLAB shows it in console if it's entered with Alt-0239
, but displays as empty square.
MATLAB returns 26 as character's code:
>> int32('Naïve')
ans =
78 97 26 118 101
This symbol isn't present in MATLAB's TeX Character Sequence Table.
Upvotes: 3
Views: 1837
Reputation: 3249
This must work:
X=rand(10,1)
Y=rand(10,1)
plot(X,Y)
title('na\"{i}ve','interpreter','latex');
If you need you can also change font and size , etc.
By the way, take a look at
http://en.wikibooks.org/wiki/LaTeX/Special_Characters
Upvotes: 5