Text graphic function - Graphics objects:
The text graphic function permits text to be printed in a Figure Window, involving special characters which are printed by using \specchar, where specchar is the real name of the special character. The format of the call to text function is as shown below:
where x & y are coordinates on the graph of the starting of the text box in which the text string appears.
To see the options for special characters, under the Contents tab in Help, click the Handle Graphics Property Browser, then click Core Objects, and then select Text. The special characters are shown in a table under the String property. The special characters involve letters of the Greek alphabet, arrows, and characters often used in equations. For illustration, figure shows the Greek symbol for pi and a right arrow in the text box.
>> x = -4:0.2:4;
>> y = sin(x);
>> hp = line(x,y,'LineWidth',3);
>> thand = text(2,0,'Sin(\pi)\rightarrow')