creates a Q grid

Syntax

qgrid = sw_qgrid(Name,Value)

Description

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

'u'
Row vector with 3 elements, determines the first axis in 3D space, default value is [1 0 0].
'v'
Second axis, default value is [0 1 0].
'w'
Third axis, default value is [0 0 1].
'uoffset'
Row vector with 3 elements, determines the offset of origin in lu, (fourth element is accepted but discarded).
'ubin'
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
'vbin'
Same as ubin but along the -axis.
'wbin'
Same as ubin but along the -axis.
'nExt'
Vector with -elements that can define fractional bin steps, default values is [1 1 1].
'lab'
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.

'fid'
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

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

See Also

sw_qscan