Creates a tensor with the vector v on its superdiagonal and zeros
elsewhere, mirroring the MATLAB Tensor Toolbox tendiag.
Examples
D <- tendiag(1:3, c(3, 3, 3))
Creates a tensor with the vector v on its superdiagonal and zeros
elsewhere, mirroring the MATLAB Tensor Toolbox tendiag.
D <- tendiag(1:3, c(3, 3, 3))