surf
is a function which displays a quad-mesh, from your output I can only tell that you did not input the data in the right order or shape, it seems to randomly connect the wrong points.
In the simplest case (a regular quad-mesh) means that each column of X contains the same value and each row of Y. A small example:
>> [X,Y] = meshgrid(0:4);
>> X
X =
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
>> Y
Y =
0 0 0 0 0
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
Check if this is possible for your data.
1
solved How to interpolate with MATLAB 3D usind scatteredinterpolant plot? [closed]