Why griddatan return NaN values when interpolating 3D and higher input data?
古いコメントを表示
Hi, I want to use Griddatan for 6D interpolation, right now I am testing it with 3D input data but my result is always NaN and a warning that says " Matrix is singular to working precision" I am testing it with simple data like this
A= [2 4 4; 2 2 4; 4 2 4;4 4 4];
GX= [1;1;2;2];
GY= [2;1;1;2];
GZ= [2;2;2;2];
AI= [3 3 4];
GIX= mygriddatan(A,GX,AI,'linear');
GIY= mygriddatan(A,GY,AI,'linear');
GIZ= mygriddatan(A,GZ,AI,'linear');
回答 (1 件)
John D'Errico
2016 年 4 月 15 日
編集済み: John D'Errico
2016 年 4 月 15 日
1 投票
You have 4 points in three dimensions. But really, they do not live in three dimensions. They all lie in EXACTLY one plane. You do not have three dimensional data. See that All the points have a constant value of Z=2.
Then you somehow hope to magically interpolate to find the value when Z=4. Sorry, but this is not gonna happen. This is not how interpolation works. Maybe it is time to do some reading online about interpolation?
The first flag that you are doing something wrong was the singular matrix.
カテゴリ
ヘルプ センター および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!