MATLAB ªº interp2 «ü¥O¥i¶i¦æ¤Gºû®æ¤lÂI¤º´¡¡A¨ä¨Ï¥Î»yªk¦p¤U¡G
zi = interp2(x, y, z, xi, yi, method)
¨ä¤¤ z ¬O¤@¯x°}¡A¥Nªí¤@¨ç¼Æªº°ª«×¡A¦Ó¯x°} x ¤Î y «h¬O¦¹¨ç¼Æ¦b¤è®æ¤lÂIªº x ¤Î y ®y¼Ð¡A¯x°} xi ¤Î yi «h¬O¤º´¡ÂIªº x ¤Î y ®y¼Ð¡A¦r¦ê method «h«ü©w¨Ï¥Îªº¤º´¡ªk¡A¦³ 4 ºØ¡G
- 'nearest'¡G¾FªñÂI¤º´¡ªk
- 'linear'¡G¤Gºû½u©Ê¤º´¡ªk
- 'spline'¡G¤Gºû Spline ¤º´¡ªk
- 'cubic'¡G¤Gºû¤T¦¸¤º´¡ªk
¨Ï¥Î interp2 ®É¡Ax ¤Î y ³£¥²¶·¬OÄY®æ»¼¼W©Î»¼´î¡C¤@¯ë±¡ªp¤U¡Ax ¤Î y ³£¬O¥Ñ meshgrid ©Ò²£¥Í¡A¥H«OÃÒ¨ä®æ¦¡ªº¥¿½T©Ê¡C
¥Î¤£¦Pªº¤èªk¶i¦æ¤Gºû¤º´¡¡A·|±o¨ì¤£¦Pªº®ÄªG¡A¥H¤U§Ų́ϥΦ±±¹Ï¤Îµ¥°ª½u¨ÓÅã¥Ü¤£¦P¤º´¡ªk©Ò±o¨ìªº¤£¦Pµ²ªG¡G
¥Ñ¤W¨â¹Ï¥i¬Ý¥X¡Amethod = 'cubic' ²£¥Íªº¦±±¸û¨ä¥¦¨âºØ¤èªk¡]'nearest' ¤Î 'linear'¡^¬°¥·Æ¡CY¨Ï¥Î 'spline' ¤]·|²£¥Í¥·Æªº¦±±¡A³o³¡¤À½ÐŪªÌקï¤Wz½d¨Òµ{¦¡¡A¦Û¦æ¸Õ¸Õ¬Ý¡C
MATLABµ{¦¡³]p¡G¶i¶¥½g