MATLAB: How to draw a 3D surface plot with some disordering points

3d surfaceMATLAB

I want to draw a 3D surface with the data in the annex.
x, y, z means the X-axis, Y-axis, Z-axis,respectively.
In fact (x,y) is a mesh of the unit square, but not in order. Thus I don't know how to apply mesh or surface on the data.

Best Answer

load data.mat ;
xi = unique(x) ;
yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = griddata(x,y,z,X,Y) ;
surf(X,Y,Z)