| Group: | Matrix Manipulation |
| Topic: | Sorting and Counting |
| See also: | dot paf {} |
| Function: | [] | |
| Description: |
[] gives a subarray of an array.
|
| Usage: | y = x[{,...,} d1 {,d2{,...}}] | |
| Input: | ||
| x | multidimensional array | |
| di i=1,2,... | vector | |
| Output: | ||
| y | subarray of x | |
x=1:12 y=reshape(x,#(3,4)) y y[2:3,1:3]
Contents of y [1,] 1 4 7 10 [2,] 2 5 8 11 [3,] 3 6 9 12 Contents of _tmp [1,] 2 5 8 [2,] 3 6 9
| Group: | Matrix Manipulation |
| Topic: | Sorting and Counting |
| See also: | dot paf {} |