I have a superficial plot that I am trying to do. x is a vector element, a vector of a vector 300, and z is an element matrix of size 300 * 11.
When I try to build it like this:
surf(x y z)
The surface does not appear. There are axles, but no surface.

However, if for some reason I make a surface plot of a subset of a matrix as follows:
surf(x y(1:31) z(1:31,:))
Then it works and the plot appears.

As soon as I increase the number in brackets to 32, it stops working. If I change the range from 2:32, then it works, so it has nothing to do with the data only the size of the matrices.
What's going on here? How to fix it?
PS I would add code, but it's a little long and complicated, and imports .txt files to load into vectors x and y.
source