MATLAB Answers

scatteredInterpolant gives null matrix for collinear data . .

3 views (last 30 days)
Parthu P
Parthu P on 10 Jan 2020
Answered: Image Analyst on 11 Jan 2020
Hello, I want to interpolate scattered data (x,y,z). x and y are collinear (x and y = [0.05 0.1 0.15 0.20 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6] ).
When I use:
F = scatteredInterpolant(x, y, z);
[Xq, Yq] = meshgrid(x, y);
Zq = F(Xq, Yq);
I get empty Zq with following error : The underlying triangulation is empty - the points may be collinear.
Please help me on this.

  2 Comments

Walter Roberson
Walter Roberson on 10 Jan 2020
Add a small random offset to x and y so that they are not colinear

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 11 Jan 2020
Use interp1() instead.

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by