Tensor utilities for tensor operations like contractions, sub-tensor extractions, outer-products, tensor permutations, and matrix unfoldings. Some of these are operations which have the Kronecker product, matrix transpose and matrix multiplication as special cases, while here being generalized to tensors of arbitrary valence. Read the function headers for examples and user guidance.
André Flakke (2020). Tensor Utilities (https://www.mathworks.com/matlabcentral/fileexchange/66263-tensor-utilities), MATLAB Central File Exchange. Retrieved .
Added functionality to compute the non-zero elements of the Levi-Cevita tensor of order N along with the respective coordinates in the Nth order tensor. Read the function headers for guidance and examples.
Modified the function 'tensorOuterProduct()' to accept 1. order tensors, i.e. vectors.
Added function tensorTranspose(T,P) for tensor permutations.
Forgot to add the file. Now it is added.
Added the function subTensor() which enables extraction of sub-tensors from a tensor.
Added reference: The functions are mostly based on material in Golub, Van Loan 'Matrix Computations', 4th ed. Some background material was found in Tolosa, Castillo 'From Vectors to Tensors'.
Added the function 'commuteKroneckerProduct()', which from knowledge of the dimensions of matrices A,B and the matrix K = kron(A,B), forms the matrix L = kron(B,A). I.e it commutes the kronecker product.