qgrid = sw_qgrid(Name,Value)


qgrid = sw_qgrid(Name,Value) generates n-dimensional grids () in 3D space, e.g. points on a line in 3D. It uses linearly independent vectors (“lattice vectors”) and bin values (coordinates in “lattice units” or “lu”) to generate the points. It works similarly as the d3d constructor in Horace.

Name-Value Pair Arguments

Row vector with 3 elements, determines the first axis in 3D space, default value is [1 0 0].
Second axis, default value is [0 1 0].
Third axis, default value is [0 0 1].
Row vector with 3 elements, determines the offset of origin in lu, (fourth element is accepted but discarded).
Bin points along the first axis. Can be a vector with 1, 2 or 3 elements:
  • [B1] single value along the -axis at a coordinate of B1*u
  • [B1 B2] range along the -axis at coordinates of [B1:1/nExt:B2]*u
  • [B1 dB B2] range along the -axis at coordinates of [B1:dB:B2]*u
Same as ubin but along the -axis.
Same as ubin but along the -axis.
Vector with -elements that can define fractional bin steps, default values is [1 1 1].
Cell array of projection axis labels with 3 elements (4th element discarded), e.g. {'x' 'y' 'z'}.

The dimension count is determined by the number of given bins (), so if only ubin is given, ; if both ubin and vbin are defined then , etc.

Defines whether to provide text output. The default value is determined by the fid preference stored in swpref. The possible values are:
  • 0 No text output is generated.
  • 1 Text output in the MATLAB Command Window.
  • fid File ID provided by the fopen command, the output is written into the opened file stream.

Output Arguments

A matrix with dimensions of , where is the index of points along th axis with .

See Also