Meshgrid

Parent Previous Next

Meshgrid


Rectangular grid in 2-D space



Syntax


meshgrid(v)

v is a row/column real vector contains 2 or 3 elements

Replicates the grid vector v to produce a full grid. This grid is represented by the output coordinate arrays X and Y. When v is a 2-element vector, the first and second elements are the minimum and maximum range of the grid. When v is a 3-element vector, the first and third are the minimum and maximum range of the grid while the second element is the grid size. See examples below to get more information.

meshgrid(v, w)

v and w are row/column real vectors contains 2 or 3 elements

Replicates the grid vector v and w to produce a full grid. The output coordinate array X is set by the value of v and the output coordinate array Y is set by the value of w. The elements in vectors v and w have the same meaning as above. See examples below to get more information.


Examples


Input

Output

meshgrid([1,5])

meshgrid([1,2,10])

meshgrid([1,5], [4,8])

meshgrid([1,2,5], [3,8])

<A, B> = meshgrid([1,2,5], [3,8])

Created with the Personal Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source