`[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. |

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]`

.
>>// 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))