FEATool  v1.7.1
Finite Element Analysis Toolbox
 All Files Functions Pages
rectgrid.m File Reference


RECTGRID Generate 2D rectangular tensor product quadrilateral grid.

[ GRID ] = RECTGRID( N_CX, N_CY, XP ) Generates a tensor product quadrilateral grid with N_CX, N_CY cells in the x and y-directions, respectively. The optional argument XP=[x1 y1 x2 y2] specifies the coordinates of the lower left (x1,y1) and upper right (x2,y2) corners. A call without input arguments generates a default 10x10 unit square.

1) A 10x10 grid on the domain spanned by [ 0..1, 0..1 ]
  grid = rectgrid();
2) A 20x40 grid on the domain spanned by [ -0.5..0.5, 1..2 ]
  grid = rectgrid( 20, 40, [-0.5 0.5; 1 2] );
See also
blockgrid, circgrid, cylgrid, holegrid, linegrid, ringgrid, spheregrid