meshgrid
- :
[X, Y] =meshgrid(x, y)¶ - :
[X, Y, Z] =meshgrid(x, y, z)¶ - :
[X, Y] =meshgrid(x)¶ - :
[X, Y, Z] =meshgrid(x)¶ Cartesian coordinate arrays for a 2-D rectangular or 3-D box grid.
With
ny = numel (y)andnx = numel (x), X and Y areny-by-nxwithX(i,j) = x(j)andY(i,j) = y(i). The three-argument form (or one argument with three outputs) addsnz = numel (z)andZ(i,j,k) = z(k). A single vector argument is reused for every axis. Output classes follow the inputs.