3-4 ������r���[�J

MATLAB ¥i¦b¹Ï§Î©Î¹Ï¶b¥[¤J»¡©ú¤å¦r¡A¥H¼W¶i¾ãÅé¹Ï§Îªº¥iŪ©Ê¡A¬ÛÃö«ü¥O¥i¦Cªí¦p¤U¡G

«ü¥O»¡©ú
title ¹Ï§Îªº¼ÐÃD
xlabel x ¶bªº»¡©ú
ylabel y ¶bªº»¡©ú
zlabel z ¶bªº»¡©ú¡]¾A¥Î©ó¥ßÅéø¹Ï¡^
legend ¦h±ø¦±½uªº»¡©ú
text ¦b¹Ï§Î¤¤¥[¤J¤å¦r
gtext ¨Ï¥Î·Æ¹«¨M©w¤å¦rªº¦ì¸m

¦³Ãö¹Ï¶bªº»¡©ú¤å¦r¡A¥iÁ|¨Ò¦p¤U¡G

Example 1: 03-¤Gºû¥­­±Ã¸¹Ï/plotxy15.msubplot(1,1,1); x = 0:0.1:2*pi; y1 = sin(x); y2 = exp(-x); plot(x, y1, '--*', x, y2, ':o'); xlabel('t = 0 to 2\pi'); ylabel('values of sin(t) and e^{-x}') title('Function Plots of sin(t) and e^{-x}'); legend('sin(t)','e^{-x}');

¨ä¤¤ legend «ü¥O·|µe¥X¤@¤p¤è¶ô¡A¥]§t¨C±ø¦±½uªº»¡©ú¡C¦pªG¹ï legend ¤è¶ô¦ì¸m¤£º¡·N¡A¥i¥Î·Æ¹«ÂI¿ï©ì©ñ¦Ü¾A·í¦ì¸m¡C¦¹¥~¡AMATLAB ±N¤Ï±×½u¡u\¡vµø¬°¯S®í²Å¸¹¡A¦]¦¹¥i²£¥Í¤W¼Ð¡B¤U¼Ð¡B§Æþ¦r¥À¡B¼Æ¾Ç²Å¸¹µ¥®ÄªG¡A¨ä¿í´`ªº³W«h¦p¦P¤@¯ë LaTex ©Î TeXªº¼Æ¾Ç¼Ò¦¡¡A¸Ô±¡¥i¥Ñ help text ¨Ó¬d¨ì¬ÛÃöªº½u¤W»¡©ú¡C

­Y­n¦b¹Ï§Î¤W­±¥[¤J¤å¦r¡A¥i¥Î text ©Î gtext «ü¥O¡Ctext «ü¥Oªº¨Ï¥Î»yªk¬° text(x, y, string)¡A¨ä¤¤ x¡By ¬O¤å¦rªº°_©l®y¼Ð¦ì¸m¡Astring «h¥Nªí¦¹¤å¦r¡AÁ|¨Ò¦p¤U¡G

Example 2: 03-¤Gºû¥­­±Ã¸¹Ï/plotxy16.mx = 0:0.1:2*pi; plot(x, sin(x), x, cos(x)); text(pi/4, sin(pi/4),'\leftarrow sin(\pi/4) = 0.707'); text(5*pi/4, cos(5*pi/4),'cos(5\pi/4) = -0.707\rightarrow', 'HorizontalAlignment', 'right');

¦b¤W¨Ò¤¤¡A¡uHorizontalAlignment¡v¤Î¡uright¡v«ü¥Ü text «ü¥O±N¤å¦r¦V¥k¤ô¥­¾a»ô¡C

gtext ªº¨Ï¥Î»yªk¬° gtext(string)¡A«Ý±z¨Ï¥Î·Æ¹«¦b¹Ï¤WÂI¿ï¤@¦ì¸m«á¡Astring §YÅã¥Ü¦b¨ä¤W¡C»Ýª`·Nªº¬O¡Agtext ¥u¯à¥Î¦b¤Gºû¥­­±Ã¸¹Ï¡C


MATLABµ{¦¡³]­p¡G¤Jªù½g