How to use interpolation?

조회 수: 5 (최근 30일)
민준 배
민준 배 2022년 11월 6일
댓글: KSSV 2022년 11월 6일
I have longitude, latitude, the veolocity of sea surface and a buoy velocity
I want to know the relationship between sea surface velocity and buoy velocity
so i want to interpolate the velocity of sea surface using interp2
in this case how do i make the function?
  댓글 수: 2
KSSV
KSSV 2022년 11월 6일
Is your sea surface velocity a 3D data?
민준 배
민준 배 2022년 11월 6일
no it is 2D data

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

답변 (1개)

KSSV
KSSV 2022년 11월 6일
Let lon,lat,U be your 2D data, and x,y,u be your buoy data.
Ui = interp2(lon,lat,U,x,y) ;
If your data is #d (I hope it is), then run loop for each time step.
Other option is; get the index of nearest neightbour of (x,y) in (lon,lat) and extract U for this index.
  댓글 수: 3
민준 배
민준 배 2022년 11월 6일
lon and lat data is 1440*720 single and the U data is 1440*720 double
KSSV
KSSV 2022년 11월 6일
Read about scatteredInterpolant or attach your data.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by