MATLAB: How to write an accent in a French sentence on a figure (title, xlable,ylabel)

accentapostrophecharacter vectorfrenchstringxlabelylabel

Let say that I want to label the x-axis or the y-axis or added a specified title to a figure, and the statement contains an accent like ( Numéro d'iteration), I found an answer for this problem https://www.mathworks.com/matlabcentral/answers/25698-accent-as-a-character-in-a-string, but it is not working because of the sentence looks like: " Numéro d''iteration".
Any ideas how can I fix this problem?

Best Answer

Note that strings and char vectors are different things, and so the apostrophe needs to be defined differently:
str = "d'iteration"
chr = 'd''iteration'
Related Question