Returns a square matrix with the elements of M along the diagonal, and zero elsewhere. This is useful for scaling locations.
Format
DMAT(M)
Argument
Example
The following example illustrates the use of the DMAT function:
Function | DMAT({1, 2, 3}) |
Result | {{1, 0, 0}, {0, 2, 0}, {0, 0, 3}} |
Another possible use is:
DMAT({1, 1, 2.5}) @ polyline.location
This computes a new collection of locations with the z component scaled by a factor of 2.5.