%% Determine Time to Compute Matrix Summation
% Time the combination of several mathematical matrix operations: matrix transposition, element-by-element multiplication, and summation of columns.

A = rand(12000,400);
B = rand(400,12000);
f = @() sum(A.'.*B, 1);
timeit(f)

% Copyright 2015 The MathWorks, Inc.