Hello,
I have two matrices I would like to compare.
First Matrix:
Serna (360×720)
lat (360×1)
lon (720×1)
Second Matrix:
first_model (288×192)
lat_model (192×1)
lon_model (288×1)
I would like to interpolate first_model to the dimensions of Serna. However, when I use this code:
[X, Y] = meshgrid(lat_model, lon_model); %first_model coordinates
[Xq, Yq] = meshgrid(lat, lon); %Serna coordinates
Serna_approx = interp2(X, Y, first_model', Xq, Yq);
I get the error that it is not monotonically increasing. However, when I interpolate Serna to the dimensions of first_model (to lower resolution), it works perfectly fine. I don't know what I'm doing wrong.
I have attached the data
Any help is appreciated.
Thanks!
Melissa
Best Answer