Skip to content

pagetrace

linear-algebra · scripts/linear-algebra/pagetrace.m

: t = pagetrace (X)

Compute the trace of each page of an N-D array.

Each page X(:,:,i,j,...) must be square. The result t has size [1, 1, size(X,3:end)] (trailing page dimensions preserved). Output class matches trace (single preserved; other numeric types promote to double).