powered by
This function split a matrix into a list of blocks (either by rows and columns).
partition(Matrix, nrows, ncols)
a list of partitioned submatrices
a matrix to split .
positive integer indicating the number of rows blocks.
positive integer indicating the number of columns blocks.
Mat = matrix(c(1,0.5,0,0, 0.5,2,0,0, 0,0,3,0.2, 0, 0, 0.2,4), nrow = 4, ncol = 4, byrow = TRUE) partition(Matrix = Mat, nrows = 2, ncols = 2)
Run the code above in your browser using DataLab