Hi,
To create discontinuities in your surface plot using the ‘surf’ function, you can replace height values of ‘zero’ with ‘NaN’. This will prevent the surface from being drawn at those points, resulting in the desired gaps.
Assuming ‘z’ is your data array for heights, you can use the following line to introduce discontinuities:
% Replace zero values with NaN to create discontinuities
z(z == 0) = NaN;
I hope this is helpful!