MATLAB Answers

Error using griddedInterpolant.Grid coordinate arrays have inconsistent size.

17 views (last 30 days)
MattyK
MattyK on 14 Feb 2019
Commented: MattyK on 15 Feb 2019
Good day
Kindly help
I am trying to use griddedInterpolant on my gridded data with the following dimensions:
latitudes length = 129
longitude length = 161
size(data) = 129 161
> F = griddedInterpolant(lat,lon,data);
Kindly suggest what I can do to get rid of the error. Thanks.

  0 Comments

Sign in to comment.

Accepted Answer

Matt J
Matt J on 14 Feb 2019
F = griddedInterpolant({lat,lon},data);

  1 Comment

MattyK
MattyK on 15 Feb 2019
Thank you so so much. It worked :)
It was just complaining about the below error since my latitudes where decreasing. Howeever I managed to use flipud(lat) to fix it. Thanks once more.
Error using griddedInterpolant
The grid vectors must be strictly monotonically increasing.

Sign in to comment.

More Answers (0)