# contour plot of cloud of points

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.

New contributor
Amine HANINI is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.