Interpolating to latitude, longitude and time

조회 수: 3 (최근 30일)
David E.S.
David E.S. 2021년 5월 7일
댓글: David E.S. 2021년 5월 7일
Hi,
I have a database with columns of latitude, longitude, time and a variable. I want to interpolate that variable to the latitude, longitude and time of another database. How can I do that?
VERSION: MATLAB 2019b

채택된 답변

KSSV
KSSV 2021년 5월 7일
Read about interp1 and interp2.
  댓글 수: 6
KSSV
KSSV 2021년 5월 7일
T = readtable('EXAMPLE_DATA.xlsx') ;
X = T.X ;
Y = T.Y ;
Z = T.Z ;
V = T.V ;
Xq = T.Xq ;
Yq = T.Yq ;
Zq = T.Zq ;
% Vq = griddata(X,Y,Z,V,Xq,Yq,Zq) ;
F = scatteredInterpolant(X,Y,Z,V,'nearest') ;
Vq = F(Xq,Yq,Zq) ;
scatter3(X,Y,Z,[],V,'h','filled')
colorbar
figure
scatter3(Xq,Yq,Zq,[],Vq,'h','filled')
colorbar
David E.S.
David E.S. 2021년 5월 7일
That's exactly what I want. Thanks!!!

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by