11

I want to display hebrew text on the screen using the text command in MATLAB:

text(0.6, 0.5, 'ירוק', 'rotation', 180, 'fontsize', 50, 'color', 'r')

The problem is that it displays gibberish.

Does anybody know why? What should I do in order to display the text correctly?

Eitan T
  • 32,037
  • 13
  • 65
  • 103
user552231
  • 1,011
  • 2
  • 18
  • 35
  • It might well be an encoding problem - the "gibberish" you're seeing may be a result of Matlab interpreting the file as using a different character set to what you've saved it as. What exactly did get displayed? Was it:  ירוק or something similar? – psmears Jan 09 '11 at 15:36
  • ... and if they don't, then add comments and/or update your question with the extra information describing why they're no good :-) – psmears Jan 11 '11 at 17:03

1 Answers1

12

You need to use a font that supports Hebrew characters - the default font (Helvetica) does not. You can use 'Courier', David' etc. For example:

text(0.6,0.5,'ירוק','fontname','david','rotation',180,'fontsize',50,'color','r')

בהצלחה!

Yair Altman
  • 5,656
  • 28
  • 34