現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425018/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425063/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425388/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425708/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425713/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1425718/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1426893/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1426898/image.png)
その他の回答 (0 件)
参考
カテゴリ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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 (한국어)