meshgrid
Construct a rectangular grid of points from the vectors of x and y coordinates of the grid.
[x,y]=meshgrid(xg,yg)
Inputs
xg The vector of x-coordinates.
yg The vector of x-coordinates.
Outputs
x The matrix of x-coordinates of the grid points.
y The matrix of y-coordinates of the grid points.


Description
If yg has n elements and x has m elements, an nXm grid of points is constructed, with y[i,j]=yg[i] and x[i,j]=xg[i] .
Example
>>// This example illustrates how to draw parametric surfaces
>>// defined by mappings in the complex plane.
>>x=[0:.02:1];
>>y=x
>>(x,y)=meshgrid(x,y);
>>w=x+i_y;
>>z=sin(w*2pi)
>>mesh(real(z),imag(z),abs(z))