summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/matlab/testProductFunction.m
blob: 682a0056d234300e2190ffafa2450ca1ac233a75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function testProductFunction

matrixSize = zeros(1, 2);
matrixSize(1) = 4;
matrixSize(2) = 5;
inputMatrix = zeros(matrixSize(1), matrixSize(2));

for i=1:matrixSize(1)
    for j=1:matrixSize(2)
        inputMatrix(i,j) = i+j;
    end
end

outputMatrix = product(inputMatrix, 1);
actualOut = prod(inputMatrix, 1);

if outputMatrix == actualOut
    disp('SUCCESS');
else
    disp('ERROR');
end