Files
LAFF/Answers/Week05/test_Gemm_unb_var1.m
Julien Lengrand-Lambert d4dce71599 Create repo
2018-05-02 09:13:08 +02:00

22 lines
390 B
Matlab
Executable File

m = 5;
n = 3;
k = 4;
C = randi( [-2,2], m, n )
A = randi( [-2,2], m, k )
B = randi( [-2,2], k, n )
% Compute A * B + C via MatMatMult
Gemm_unb_var1( A, B, C )
% Compute A * B + C
A * B + C
% Check if they compute the same
if ( isequal( Gemm_unb_var1( A, B, C ), A * B + C ) )
disp( 'it appears Gemm_unb_var1 computes correctly' )
else
disp( 'Gemm_unb_var1 has a problem' )
end