Function File: y = ndcovlt (x, t1, t2, …)

Computes an n-dimensional covariant linear transform of an n-d tensor, given a transformation matrix for each dimension. The number of columns of each transformation matrix must match the corresponding extent of x, and the number of rows determines the corresponding extent of y. For example:

  size (x, 2) == columns (t2)
  size (y, 2) == rows (t2)

The element y(i1, i2, …) is defined as a sum of

  x(j1, j2, …) * t1(i1, j1) * t2(i2, j2) * …

over all j1, j2, …. For two dimensions, this reduces to

  y = t1 * x * t2.'

[] passed as a transformation matrix is converted to identity matrix for the corresponding dimension.

Package: linear-algebra