## ----setting, echo=TRUE-------------------------------------------------------
library("otTensor")

.show_matrix <- function(mat, main = ""){
    mat_rev <- apply(mat, 2, rev)
    mat_rev <- t(mat_rev)

    row_index <- 1:ncol(mat_rev)
    col_index <- 1:nrow(mat_rev)

    # grayscale
    image(mat_rev, col = gray((0:255)/255), xaxt = "n", yaxt = "n",
        xlab = "", ylab = "", axes = FALSE, main = main)
}

## ----sessionInfo, echo=FALSE--------------------------------------------------
sessionInfo()

