GRIDDATA関数を実行すると、「qhull precision error」が発生するのはなぜですか?

4 visualizzazioni (ultimi 30 giorni)
次のコマンドを実行すると、エラーが発生します。
x = [6, 10, 6, 10];
y = [25, 25, 125, 125];
z = [16, 12, 28, 21];
xi = 8;
yi = 100;
zi = griddata(x, y, z, xi, yi)
(エラーメッセージ)
??? qhull precision error: initial simplex is not convex. Distance=0
While executing: | qhull d Qt Qbb Qc
Options selected for Qhull 2003.1 2003/12/30:
delaunay Qtriangulate Qbbound-last Qcoplanar-keep _pre-merge
_zero-centrum Pgood Qinterior-keep _max-width 1e+002
Error-roundoff 1.7e-013 _one-merge 1.2e-012 Visible-distance 3.5e-013
U-coplanar-distance 3.5e-013 Width-outside 6.9e-013 _wide-facet 2.1e-012
(以下省略)

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 18 Gen 2010
Release 2009b (R2009b) にて、機能拡張されました。それ以前のリリースに関しては、以下の記述をご確認ください。
GRIDDATA 関数は内部で Qhull アルゴリズムを使用しており、この Qhull アルゴリズムに関する問題により発生します。
このエラーを回避するには、以下のように、中括弧で 'QJ' オプションを指定します。
zi = griddata(x, y, z, xi, yi, 'linear', {'QJ'})
'QJ'オプションは、precision error を避けるために入力座標に乱数を加えるという操作を行います。
※注意
上記回避策を実行後、次のような警告メッセージが出力されることがあります。
警告: qhull precision warning:
The initial hull is narrow (cosine of min. angle is 1.0000000000000000).
A coplanar point may lead to a wide facet. Options 'QbB' (scale to unit box)
or 'Qbb' (scale last coordinate) may remove this warning. Use 'Pp' to skip
this warning. See 'Limitations' in qh-impre.htm.
この場合、以下のように'Pp'オプションを使用すると、警告メッセージが出力されません。
zi = griddata(x, y, z, xi, yi, 'linear', {'QJ','Pp'})
Qhull アルゴリズムに関連する情報は、下記URLを参照してください。
Qhull オプションの詳細は、下記URLを参照してください。
DELAUNAY 関数でも同様のエラーが出力されることがあります。
詳細については、ページ下部の関連ソリューション:DELAUNAY 関数を実行すると、「qhull precision error」が発生します。 を参照してください。

Più risposte (0)

Categorie

Scopri di più su Gridded and Scattered Sample Data in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!