MESHGRID

Calls the MATLAB MESHGRID function and returns a real array. Given the x and y vectors, the MESHGRID function returns the X or Y grid coordinates.

Format

MESHGRID (x, y, XorY)

Arguments

 
x
The x coordinates of the grid.
y
The y coordinates of the grid.
XorY
A switch value indicating whether the x or y coordinates of the griddata is desired: 0 means x, 1 means y.

Example

You could use the following to compute the X values for input to the GRIDDATA:
variable create variable=xx real=(meshgrid({1,2},{10,11,12},0))
which produces these values for xx
{1.0,1.0,1.0,2.0,2.0,2.0}
To create the Y vector for the same grid, use:
variable create variable=yy real=(meshgrid({1,2},{10,110,12}, 1))
which produces a value for yy of
{10.0,11.0,12.0,10.0,11.0,12.0}