basis {lazy.mat} | R Documentation |
Standard Basis Vector
basis(n, i, drop = 0)
n |
The size of the vector |
i |
location of 1 |
nr=3 nc=3 K=matrix(0,nr*nc,nr*nc) for( i in 1:nr ){ for( j in 1:nc) { K=K+kronecker(basis(nr,i)%*%t(basis(nc,j)), basis(nc,j)%*%t(basis(nr,i))) } } K