index_to_coord | R Documentation |
convert 1d indices to n-dimensional real world coordinates
index_to_coord(x, idx)
## S4 method for signature 'NeuroSpace,numeric'
index_to_coord(x, idx)
## S4 method for signature 'NeuroSpace,integer'
index_to_coord(x, idx)
## S4 method for signature 'NeuroVol,integer'
index_to_coord(x, idx)
## S4 method for signature 'NeuroVec,integer'
index_to_coord(x, idx)
x |
the object |
idx |
the 1D indices |
a matrix of real coordinates
bvol <- NeuroVol(array(0, c(10,10,10)), NeuroSpace(c(10,10,10), c(1,1,1)))
idx <- 1:10
g <- index_to_coord(bvol, idx)
idx2 <- coord_to_index(bvol, g)
all.equal(idx, idx2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.