ttclass/diag.m
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