add support for ir images in matlab

modify the code in matlab to support ir images