Difference between revisions of "Ttclass/diag.m"
(Normalise sequential blank lines) |
m (Add missing Version/authors metadata and remove raw author emails) |
||
| Line 8: | Line 8: | ||
==See also== | ==See also== | ||
[[ttclass.m]], [[ttclass/trace.m]], [[ttclass/full.m]], [[Tensor_train_module#Tensor_train_functions|Tensor train functions]] | [[ttclass.m]], [[ttclass/trace.m]], [[ttclass/full.m]], [[Tensor_train_module#Tensor_train_functions|Tensor train functions]] | ||
| + | |||
| + | ''Version 2.1, authors: [[Dmitry Savostyanov]]'' | ||
Revision as of 16:26, 5 June 2026
Mimics the diag behavior for tensor train matrix. Syntax:
tt=diag(tt)
If tt is a square matrix, return a vector by computing diag of every core. If tt is a vector (one mode size is ones), return a diagonal matrix.
See also
ttclass.m, ttclass/trace.m, ttclass/full.m, Tensor train functions
Version 2.1, authors: Dmitry Savostyanov