create matrices or 3-D arrays
[X, Y] = meshgrid(x) [X, Y] = meshgrid(x,y) [X, Y, Z] = meshgrid(x,y,z)
vectors
matrices in case of 2 input arguments, else 3-D arrays in case of 3 input arguments
Create matrices or 3-D arrays.
x = -1:0.1:1; [X, Y] = meshgrid(x); Z = sinc(2*%pi * X.*Y); surf(X, Y, Z)