Einsum for MATLAB
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 .
General Information
- Version 1.0.0 (13.7 KB)
-
View License on GitHub
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.
