search for: xirow

Displaying 3 results from an estimated 3 matches for "xirow".

Did you mean: irow
2017 Jul 05
4
expand gridded matrix to higher resolution
...eplicate might be promising, but then still need to rearrange the output into the column and row format we need. A simple example: mm=matrix(1:15,nrow=3,byrow = T) xmm=matrix(NA,nrow=nrow(mm)*3,ncol=ncol(mm)*3) for(icol in 1:ncol(mm)) { for(irow in 1:nrow(mm)) { xicol=(icol-1)*3 +c(1:3) xirow=(irow-1)*3 +c(1:3) xmm[xirow,xicol]=mm[irow,icol] } } mm > > mm > [,1] [,2] [,3] [,4] [,5] > [1,] 1 2 3 4 5 > [2,] 6 7 8 9 10 > [3,] 11 12 13 14 15 > xmm > > xmm > [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,1...
2017 Jul 05
0
expand gridded matrix to higher resolution
...n still need to rearrange the >output into the column and row format we need. > >A simple example: >mm=matrix(1:15,nrow=3,byrow = T) >xmm=matrix(NA,nrow=nrow(mm)*3,ncol=ncol(mm)*3) >for(icol in 1:ncol(mm)) { > for(irow in 1:nrow(mm)) { > xicol=(icol-1)*3 +c(1:3) > xirow=(irow-1)*3 +c(1:3) > xmm[xirow,xicol]=mm[irow,icol] > } >} >mm >> > mm >> [,1] [,2] [,3] [,4] [,5] >> [1,] 1 2 3 4 5 >> [2,] 6 7 8 9 10 >> [3,] 11 12 13 14 15 >> >xmm >> > xmm >>...
2017 Jul 05
0
expand gridded matrix to higher resolution
...still need to rearrange the output into the column and row format we need. > > A simple example: > mm=matrix(1:15,nrow=3,byrow = T) > xmm=matrix(NA,nrow=nrow(mm)*3,ncol=ncol(mm)*3) > for(icol in 1:ncol(mm)) { > for(irow in 1:nrow(mm)) { > xicol=(icol-1)*3 +c(1:3) > xirow=(irow-1)*3 +c(1:3) > xmm[xirow,xicol]=mm[irow,icol] > } > } > mm >> > mm >> [,1] [,2] [,3] [,4] [,5] >> [1,] 1 2 3 4 5 >> [2,] 6 7 8 9 10 >> [3,] 11 12 13 14 15 >> > xmm >> > xmm >&gt...