basis {lazy.mat}R Documentation

Standard Basis Vector

Description

Standard Basis Vector

Usage

basis(n, i, drop = 0)

Arguments

n

The size of the vector

i

location of 1

Examples

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


[Package lazy.mat version 0.1.4 Index]