±¥Î¦b¦h¶µ¦¡ªº¾Þ§@¥]§t¨D­È¡B¨D®Ú¡B·L¤À¡B¿n¤Àµ¥¡A³o¨Ç¾Þ§@§Ú­Ì³£¥i¥H¬Ý¦¨¬O¦h¶µ¦¡ª«¥óªº¤èªk¡]Methods¡^¡A¨C¤@­Ó¤èªk³£¹ïÀ³¨ì @polynom ¥Ø¿ý¤Uªº¤@­Ó¨ç¦¡¡C¦Ó¥B³o¨Ç¨ç¦¡¥u¯àÀ³¥Î©ó§Ú­Ì©Ò©w¸qªº¦h¶µ¦¡ª«¥ó¡C

¤@­Ó³ÌÂ²³æªº¤èªk¡A´N¬O­n¨ú¥Î¦h¶µ¦¡ª«¥óªº«Y¼Æ¡A¥i¥H¾a¤U¦C¨ç¦¡¨Ó§¹¦¨¡G

Example 1: 15-ª«¥ó¾É¦Vµ{¦¡³]­p/@polynom/polyCoef.mfunction c = polyCoef(p) % POLYNOM/POLYCOEF Convert polynom object to coefficient vector. c = p.c;

­Y­n­pºâ¦h¶µ¦¡ªº­È¡A§Ú­Ì¥i¥H±Ä¥Î¤U¦C¨ç¦¡¡G

Example 2: 15-ª«¥ó¾É¦Vµ{¦¡³]­p/@polynom/polyval.mfunction y = polyval(p, x) % POLYNOM/POLYVAL POLYVAL(p, x) evaluates p at the points x. y = polyval(p.c, x);

Example 3: 15-ª«¥ó¾É¦Vµ{¦¡³]­p/polyval01.mp = polynom([1 2 3]); x = polyval(p, 1) y = polyval(p, [1 2 3 4])x = 6 y = 6 11 18 27

Hint

¥t¤@­Ó±¥Îªº¥\¯à¡A´N¬O¹ï¦h¶µ¦¡µe¹Ï¡A³o¥i¥Ñ¤U¦Cªº plot.m ¨ç¦¡¨Ó¹F¦¨¡G

Example 4: 15-ª«¥ó¾É¦Vµ{¦¡³]­p/@polynom/plot.mfunction plot(p, range) % POLYNOM/PLOT PLOT(p) plots the polynom p. if nargin<2 range = max(abs(roots(p)))*[-1 1]; end x = linspace(range(1), range(2)); y = polyval(p, x); plot(x, y); title(polyAsString(p)) grid on