scatteredInterpolant: what is linear interpolation in 2d?
采纳的回答
31 个评论
Say, supportPts is my input (nx2) matrix which contains n pairs of x and y coordinates in arbitrary order that define a rectangular grid. The goal should be to derive a griddedInterpolant without hard-coding it for a specific n.
Would
Interp=griddedInterpolant(unique(sort(supportPts(:,1)), unique(sort(supportPts(:,2))}, Fval);
work always?
But why would you even be starting with data in such a form? If it's a rectangular grid, you would usually be given the sampling of x and y in separate vectors from the beginning, which is the input format that meshgrid, ndgrid, and various other grid operation commands require.
Well, I come from a finite-element-like context. There, the degrees of freedom (the Fval's) and the corresponding points where they are defined (the supportPts) are sorted to reduce the bandwidth of a linear system. That's why I do not start with vectors x and y as you suggested but have pairs of coordinates in a random order.
GriddedInterpolant does not divide the elements into triangles but rather performs a bilinear interpolation?








更多回答(0 个)
另请参阅
类别
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)