Matrices can be assigned to in whole or in part. We have shown complete matrix assignment in the examples of the last few pages. In the same way that matrix elements can be referenced singly, or in groups, matrices can have single elements re-assigned, or groups of elements re-assigned. The result of an assignment expression is the left-hand-side (LHS). This is more convenient when working interactively, and when creating intermediate function arguments.
> a[2;2] = 200 a = 1 2 3 4 200 6 7 8 9 > a[2,3;2,3] = [200,300;300,400] a = 1 2 3 4 200 300 7 300 400
The row and column dimensions of the matrices on the RHS, and the
matrix description within the `[ ]
' must have the same
dimensions.