0

This must be an easy question.

I have a matrix (2D Array) of 293 rows and 200 columns (293 x 200), and I want to interpolate them to get a 2D Array of 241 rows and 145 columns (241 x 145), what is the easiest way to do it in Matlab ?

I can use interp1, and a for loop and apply it on each row, but it will take a lot of time, is there a faster or a simpler way to do it ?

Thanks

lefou
  • 13
  • 4
  • 1
    If you think it is easy, why not search for it in answered SO post? Or even better try it first yourself? Also, are you sure you are looking for interp1 + for loop? – GameOfThrows Mar 17 '16 at 13:50
  • I saw that link above, but it is not what I want to do, I need a linear interpolation fit, that is able to shrink my original array (293 x 200), into an array of (241 x 145). – lefou Mar 17 '16 at 14:06
  • That's the part I was referring that made no sense. Shrink? like resample at lower rate? – GameOfThrows Mar 17 '16 at 14:07
  • I think you might be referring to `resizem` -http://uk.mathworks.com/help/map/ref/resizem.html – GameOfThrows Mar 17 '16 at 14:13
  • Hi GameofThrows, I think that's what I wanted the resizem, I test it on a random values and it worked, thanks – lefou Mar 17 '16 at 14:19
  • You are welcome, the title of your question was confusing, try better phrasing next time (i.e. Matrix Dimension reduction via neighbor/linear interpolation) – GameOfThrows Mar 17 '16 at 14:34

0 Answers0