Tensor Utilities

Tensor Utilites for Tensor Manipulations
444 Downloads
Updated 14 Sep 2018

View License

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.

Cite As

André Flakke (2024). Tensor Utilities (https://www.mathworks.com/matlabcentral/fileexchange/66263-tensor-utilities), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
2.41.0.0

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.

2.40.0.0

Modified the function 'tensorOuterProduct()' to accept 1. order tensors, i.e. vectors.

2.30.0.0

Added function tensorTranspose(T,P) for tensor permutations.

2.20.0.0

Forgot to add the file. Now it is added.

2.2.0.0

Added the function subTensor() which enables extraction of sub-tensors from a tensor.

2.1.0.0

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'.

2.0.0.0

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.

1.1.0.0

Added image.

1.0.0.0