In matlab:
X = ones(10,10); mesh(X,X,X);
gives:
Warning: Matrix dimensions must agree, not rendering mesh
All three parameters are exactly the same, but their dimensions do not agree? Agree to what?
Restarting matlab solved the problem.