Why do I receive a "??? qhull precision error: initial facet 2 is coplanar with the interior point" message when using the GRIDDATA function in MATLAB?

43 views (last 30 days)
When I execute the following commands:
X1 = linspace(1e5, 1e6,50);
[X1 Y1] = meshgrid(X1);
V = X1.^2+Y1.^2;
XI = 2e5; YI = 2e5;
val = griddata(X1,Y1,V, XI, YI, 'linear');
I receive the following error message:
??? qhull precision error: initial facet 2 is coplanar with the interior point
ERRONEOUS FACET:
While executing: | qhull d Qt Qbb Qc
Options selected for Qhull 2002.1 2002/8/20:
delaunay Qtriangulate Qbbound-last Qcoplanar-keep _pre-merge
_zero-centrum Pgood Qinterior-keep _max-width 9e+005
Error-roundoff 1.4e-009 _one-merge 9.7e-009 Visible-distance 2.8e-009
U-coplanar-distance 2.8e-009 Width-outside 5.5e-009 _wide-facet 1.7e-008
The input to qhull appears to be less than 3 dimensional, or a computation has overflowed.
[SNIP]

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The key part of this error message is the statement:
The input to qhull appears to be less than 3-dimensional, or a computation has overflowed.
This data is obviously 3-dimensional, therefore the error is due to a computation that has overflowed.
There error occurs because the data points are either consistently larger than 1e3, or consistently smaller than 1e-3.
To workaround this issue, scale the data points so that they are within the range >1e-3 and <1e3. For this example, use the commands:
val = griddata(X1/1e5,Y1/1e5,V, XI/1e5, YI/1e5, 'linear');

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!