Displaying 1 result from an estimated 1 matches for "25positions".
2011 Nov 18
1
extract positions from matrix
...9,5)
[,1] [,2] [,3]
[1,] 15 20 25
[2,] 16 21 26
[3,] 17 22 27
[4,] 18 23 28
[5,] 19 24 29
C=matrix(30:44,5)
[,1] [,2] [,3]
[1,] 30 35 40
[2,] 31 36 41
[3,] 32 37 42
[4,] 33 38 43
[5,] 34 39 44
The positions I wish to extract are 1 and 5 of the first row of each
matrix (in my case are 25positions) and with this generate a new matrix
with the form
d=
[,1] [,2] [,3]
[1,] 1 15 30
[2,] 5 19 34
The ideais to builda loop toextract thisinformation from
hundredsmatrices, butI failed todo so.
Any helpwould be greatthank you very muchin advance
regards
.jpg
[[alternative HTML version dele...