trace

(method of tensor)

compute the trace of a rank 2 tensor

Synatx

T = trace(T)

Syntax

T = trace(T)

Input

T

rank 2 tensor

Output

T

rank 0 tensor