Difference between revisions of "Ttclass/diag.m"
m (Add missing Version/authors metadata and remove raw author emails) |
m (Repair ttclass function page template) |
||
| Line 1: | Line 1: | ||
| − | Mimics the diag | + | {{DISPLAYTITLE:ttclass/diag.m}} __NOTOC__ |
| + | Mimics the diag behaviour for tensor train matrix. | ||
| + | |||
| + | ==Syntax== | ||
tt=diag(tt) | tt=diag(tt) | ||
| − | + | ==Arguments== | |
| − | + | ||
| + | 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== | ==See also== | ||
Revision as of 17:04, 5 June 2026
Mimics the diag behaviour for tensor train matrix.
Syntax
tt=diag(tt)
Arguments
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