Difference between revisions of "Ttclass/diag.m"
m (Repair ttclass function page template) |
m (Rename Arguments section heading to Parameters) |
||
| Line 6: | Line 6: | ||
tt=diag(tt) | tt=diag(tt) | ||
| − | == | + | ==Parameters== |
tt - a tensor train representation of a matrix | tt - a tensor train representation of a matrix | ||
Revision as of 17:53, 5 June 2026
Mimics the diag behaviour for tensor train matrix.
Syntax
tt=diag(tt)
Parameters
tt - a tensor train representation of a matrix
Outputs
tt - if the input is a square matrix, returns a
vector by computing diag of every core; if
the input is a vector (one mode size is
ones), returns a diagonal matrix
See also
ttclass.m, ttclass/trace.m, ttclass/full.m, Tensor train functions
Version 2.1, authors: Dmitry Savostyanov