How to interpolate gridded data for a single point?

5 ビュー (過去 30 日間)
Andre
Andre 2014 年 1 月 13 日
回答済み: Andre 2014 年 1 月 30 日
I have a 3-d grid (lon,lat,sigma) of data. I would like to interpolate this data for specific location that I specify with lon,lat,sigma to get a sinlge value for the gridded variable. I have created a meshgrid using the dimensions that matches the dimensions of my variable arrays. I thought using interp3 would be the appropriate function to call for this but I get an error saying my specified vectors are not the same dimension as the rest of the arrays. What is the method I should be using? I can't seem to find a more appropriate function to solve this seemingly simple task.

回答 (2 件)

Paul
Paul 2014 年 1 月 13 日
griddata maybe?
  1 件のコメント
Andre
Andre 2014 年 1 月 13 日
This sounds like it should work but it does not. The data is already gridded on a regular grid. The variables have dimensions 151x156x39. I created dimensional variables (x,y,z) that match that grid. I am looking for data at xi,yi,zi. When I specify uu=interp3(x,y,z,u,xi,yi,zi) it tells me x,y,z must be matrices from meshgrid (which they are) and to use triscatteredinterp. When I specify uu=griddata3(x,y,z,u,xi,yi,zi) there appears to be an issue with the DelaunayTri function which I am totally unfamiliar with.

サインインしてコメントする。


Andre
Andre 2014 年 1 月 30 日
I realized shortly after this post that I had mixed my dimensions up, when corrected I got the appropriate answer.

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by