Error using griddedInterpolant.Grid coordinate arrays have inconsistent size.

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.

 채택된 답변

F = griddedInterpolant({lat,lon},data);

댓글 수: 1

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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

질문:

2019년 2월 14일

댓글:

2019년 2월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by