einsum

You are now following this Submission

Einstein Sommation like Numpy's einsum
Input :
- str : String like 'ik,kj-> ij'
- varargin : Double called
Output :
- Out : Double
Usage :
Matrix multiplication C = A*B
A(ik)*B(kj) = C(ij) -> C=einsum('ik,kj->ij',A,B)
Limitations :
- Taking "diagonal terms" for an nd-array isn't permitted
ex : 'iij,jk -> ik'
- Be careful about approximation error
ex : Doing A^12 with einsum gives you a N_inf(relative_error) around 1E-10

Stephane Nachar - LMT - stephane.nachar@lmt.ens-cachan.fr

Cite As

Stéphane Nachar (2026). einsum (https://github.com/SNachar/einsum), GitHub. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with R2016b to R2018b

Platform Compatibility

  • Windows
  • macOS
  • Linux

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes Action
1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.