# TENSOR_GRID_DISPLAY Plot Points in a 1D/2D/3D Tensor Grid

TENSOR_GRID_DISPLAY is a MATLAB program which can generate and display the points of a 1D/2D/3D tensor product grid formed by the same rule in each dimension, but allowing the order of points in each dimensio to vary.

For instance, it is legal to request a 3D grid using the Gauss-Legendre rule in each dimension, but with 3 points in X, 9 points in Y, and 5 points in Z.

### Usage:

tensor_grid_display ( m, n_1d, rule )
where
• m is the spatial dimension (1, 2 or 3);
• n_1d is a vector containing the order of the rule in each dimension. A rule with 3 points in X, 9 points in Y and 5 points in Z would specify [3,9,5];
• rule is a quoted string indicating the quadrature rule to be used.

The codes for quadrature rules are:

• 'CC', Clenshaw-Curtis,
• 'F1', Fejer Type 1,
• 'F2', Fejer Type 2,
• 'GL', Gauss-Legendre,
• 'GP', Gauss-Patterson, (orders 1, 3, 7, 15, 31, 63, 127, 255 or 511 only)
• 'HR', Hermite,
• 'JC', Jacobi,
• 'LG', Laguerre,
• 'NCC', Newton-Cotes Closed,
• 'NCO', Newton-Cotes Open,
• 'NCOH', Newton-Cotes Open Half.

### Languages:

TENSOR_GRID_DISPLAY is available in a MATLAB version.

### Related Data and Programs:

CC_DISPLAY, a MATLAB program which displays points on various grids derived from the Clenshaw Curtis rule.

CIRCLE_GRID_DISPLAY, a MATLAB program which reads a matrix of integers, and draws a corresponding grid of circles filled with color.

GL_DISPLAY, a MATLAB program which displays points on various grids derived from the Gauss-Legendre rule.

GRID_DISPLAY, a MATLAB program which reads a file of points on a grid or sparse grid, displays the grid and saves the image in a PNG file;

GRIDS_DISPLAY, a MATLAB program which reads two files of grids or sparse grids, displays the first with hollow blue dots, the second with red dots.

NESTED_SEQUENCE_DISPLAY, a MATLAB program which displays a set of nested sequences.

PLY_DISPLAY, a MATLAB program which displays an image of a 3D graphics file in PLY format;

SEQUENCE_STREAK_DISPLAY, a MATLAB program which displays a streak plot of a numeric sequence;

XY_DISPLAY, a MATLAB program which can read a file of coordinates of points, and display an image of the points in a MATLAB graphics window.

XY_DISPLAY_OPENGL, a C++ program which can read a file containing 2D point coordinates, and display an image of those points using Open GL.

### Examples:

• gl_1d.png, the plot for the command tensor_grid_display ( 1, 15, 'gl' )
• cc_2d.png, the plot for the command tensor_grid_display ( 2, [33,17], 'cc' )
• ncc_3d.png, the plot for the command tensor_grid_display ( 3, [7,7,7], 'ncc' )

You can go up one level to the MATLAB source codes.

Last revised on 12 October 2011.