Using a matrix in scatteredInterpolant

조회 수: 4 (최근 30일)
H ZETT M
H ZETT M 2017년 1월 11일
댓글: Jyotish Robin 2017년 1월 18일
Hey guys, so I got the following problem: I want to interpolate my matrix (size 220x180x1801) onto a new grid (of course size 220x180). So I am currently using griddata and it is pretty slow. It looks like this:
for i=1:length(time)
u_grid(:,:,i)=griddata(longitude,latitude,wind_x(:,:,i),lon,lat);
end
I wanted to try and use scatteredInterpolant, because matlab tells me it has a better performance. But when I try to use it, I get the error "The input points must be specified in column-vector format." So is there any way to use a matrix as input, because using another for-loop to do the column-vector stuff would probably slow down everything.
  댓글 수: 1
Jyotish Robin
Jyotish Robin 2017년 1월 18일
The error you describe is usually due to passing data of inconsistent dimensions.
Maybe you could try using the 'griddedInterpolant' class to perform interpolation.
More information is in the link below:
Hope it helps!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by