To illustrate these ideas, use the Copy function. Note that usage of a subspec does not produce a copy unless the Copy function is used.
>
|
|
>
|
|
| (1) |
Specification of second row as a row Vector.
>
|
|
| (2) |
Specification of third column as a column Vector. Note that the row range must be provided.
>
|
|
| (3) |
Transpose of submatrix excluding first row and last column.
>
|
|
| (4) |
The basic specification for a column Vector is of the form or . Where the row-row range, and transpose are optional.
The same comments apply as for the rows of a Matrix.
>
|
|
| (5) |
Specification of part of the Vector, and part of the transpose.
>
|
|
| (6) |
Similarly the basic specification for a row Vector is of the form or . Where the column-column range, and transpose are optional.
>
|
|
| (7) |
Specification of part of the Vector, and part of the transpose.
>
|
|
| (8) |
Now as a more involved example, consider the product of a Matrix and its transpose, but only obtain the diagonal elements of the product, placing them in the diagonal of a Matrix of the product form. The following example accomplishes this.
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
Where the whole product is specified by the following.
>
|
|
| (12) |
The final item involves shortcut specifications. If the function being called accepts mod m Matrix or Vector arguments, any dimensions where the range is implied by prior arguments can only be specified by the start of the range.
For example, the following two AddMultiple commands are equivalent:
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
>
|
|
| (16) |
where the endpoints of the ranges for the second mod m Matrix are implied by the first.