Download this file

6 lines (4 with data), 137 Bytes

1
2
3
4
5
6
function t = mytrace(A,B)
% This compute the trace inner product of two matrices A, B, of the same
% dimension.
t=sum(sum(A.*B));