# contour plot of cloud of points [closed]

I have a cloud of points scattered in a rectangle and some data in this points, a bit like this $$x(:)=[x(1), x(2), ..., x(N)] \\ y(:)=[y(1), y(2), ..., y(N)] \\ u(:)=[u(1), u(2), ..., u(N)]$$ Here, I am looking for plotting a contour of the $$u$$ data on matlab. I tried several function on matlab; contour, contourf, contourc,... etc but in vain.

• If the points come form an implicit function, you may also try the isosurface function mathworks.com/help/matlab/ref/isosurface.html I'm not posting as an answer because I'm not sure where if you have an implicit function in the first place. Jan 13 '20 at 13:31
• stackoverflow.com/q/59706804/5837734 please check the edited post in stackoverflow Jan 14 '20 at 21:38
• Please don't cross-post. Jan 20 '20 at 21:17

In essence, what you want to do is interpolate data: You want to find a function $$U(x,y)$$ so that $$U(x_i,y_i)=u_i$$. This is then the function for which you'd like to do draw isocontours.
You should take a look at books on numerical methods and search for "two-dimensional interpolation". Among the methods you will find is to triangulate your points $$(x_i,y_i)$$ to form a mesh, on which you can then define $$U(x,y)$$ as a piecewise linear function. But I think a better approach -- unless your data is pretty evenly distributed -- is to use something like the Radial Basis Function (RBF) method.