0

I have a 2D 2401*266 matrix K which corresponds to x values (t: stored in a 1*266 array) and y values(z: stored in a 1*2401 array).

I want to extrapolate the matrix K to predict some future values (corresponding to t(1,267:279). So far I have extended t so that it is now a 1*279 matrix using a for loop:

for tq = 267:279
t(1,tq) = t(1,tq-1)+0.0333333333;
end

However I am stumped on how to extrapolate K without fitting a polynomial to each individual row?

I feel like there must be a more efficient way than this??

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120

1 Answers1

1

There are countless of extrapolation methods in the literature, "fitting a polynomial to each row" would be just one of them, not necessarily invalid, not sure why you mention that you do no wan't to do it. For 2D data perhaps fitting a surface would lead to better results though.

However, if you want an easy, simple way (that might or might not work with your problem), you can always use the function interp2, for interpolation. If you chose spline or makima as interpolation functions, it will also extrapolate for any query point outside the domain of K.

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120