Your syntax for creating 3D coordinates is correct. Your call is surfincorrect. What you really need to do is to share it x, yand zon three separate parameters:
surf(x,y,z);
, . , MATLAB R2013a, parula, R2014b , , :

... x, y z, ? , [x,y,z] , x, y z 2D-, , 2D-, 10 30. surf 2D- , x 1 30, y 1 10, 2D- , surf z, z . , , , x 1 30, , .
x, y z.