MATLAB: Am I unable to display certain characters in the upper ASCII range in the title of the plot in MATLAB 7.0 (R14)

asciicharactercharactersetcharsetfontMATLABsettitleunicodewingdingwingdings

When I execute the following command in MATLAB 7.0 (R14):
title(char([129 130 131]),'fontname','wingdings')
I receive a title in which the first character is correctly displayed (a one with a circle around it), but the next two characters appear as empty rectangles. This same command works in MATLAB 6.5.1 (R13SP1) and earlier versions.

Best Answer

Constructs like the one in the example that use the char[] syntax are strongly discouraged for the following reasons:
1. The code is not portable. The availability of a particular font varies among platforms, and its encoding may also vary, even on the same platform.
2. While MATLAB guarantees the character set is unicode, it does not guarantee a particular encoding. MATLAB may change encoding in future releases.
A MATLAB user suggests the NATIVE2UNICODE function can be used as a workaround to convert an ASCII set of bytes to unicode characters, as in the following:
title(native2unicode([129 130 131]),'fontname','wingdings')
Type "doc native2unicode" at the MATLAB prompt to see the documentation for this function.