{"id":67,"date":"2006-06-29T14:00:53","date_gmt":"2006-06-29T18:00:53","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/?p=67"},"modified":"2019-10-22T12:31:47","modified_gmt":"2019-10-22T16:31:47","slug":"multidimensional-interpolation-with-integer-input","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/29\/multidimensional-interpolation-with-integer-input\/","title":{"rendered":"Multidimensional interpolation with integer input"},"content":{"rendered":"<p>\r\nA customer asked me last week how to do multidimensional interpolation with integer inputs. The MATLAB function <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/interpn.html#999094\"><tt>interpn<\/tt> <\/a>supports only double- and single-precision inputs.\r\n<\/p>\r\n\r\n<p>\r\nIt's possible to do this using a little-known Image Processing Toolbox function called <tt>tformarray<\/tt>. But <tt>tformarray<\/tt> is a general spatial transformation engine with a complicated syntax. It isn't easy to figure out how to use it for interpolation, so I decided to write a wrapper M-file to do it.\r\n<\/p>\r\n\r\n<p>\r\nThe function <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=11586&objectType=file (link no longer works)\"><tt>iminterpn<\/tt><\/a>, which has a syntax similar to <tt>interpn<\/tt>, is now available on the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\">MATLAB Central File Exchange<\/a>. I hope some of you find it useful.\r\n<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>\r\nA customer asked me last week how to do multidimensional interpolation with integer inputs. The MATLAB function interpn supports only double- and single-precision inputs.\r\n\r\n\r\n\r\nIt's possible to do... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/29\/multidimensional-interpolation-with-integer-input\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[176,174,110],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/67"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":2192,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/67\/revisions\/2192"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}