Description Usage Arguments Author(s) See Also Examples
This function builds a blockmatrix
1 2 3 |
dim |
dimension of a block-matrix |
value |
matrix containing the indices (names) of blockmatrix element. If missing, it is |
names |
charcarcter vector containing the names for each matrix-type element of the block-matrix |
list |
list containing the matrices to be inserted into the block-matrix. If |
use.as.blockmatrix |
logical value. If |
adjust_zero,add_zero_matrix,zero_element |
arguments passed to |
... |
elements of the block-matrix. |
Emanuele Cordano
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | rm(list=ls())
library(blockmatrix)
A <- array(rnorm(9,mean=1),c(3,3))
B <- 0 #array(rnorm(9,mean=2),c(3,3))
C <- 0
D <- array(rnorm(9,mean=4),c(3,3))
F <- array(rnorm(9,mean=10),c(3,3))
M <- blockmatrix(names=c("A","0","D","0"),A=A,D=D,dim=c(2,2))
E <- blockmatrix(names=c("0","F","D","0"),F=F,D=D,dim=c(2,2))
R <- M+E
S <- solve(R)
P <- blockmatmult(R,E)
l <- list(A=A,B=B,C=C,D=D,F=F)
mv <- array(c("A","B","C","D","F","F"),c(3,2))
BB <- blockmatrix(value=mv,list=l)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.