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

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 = reshapeMatrix(inputMatrix, matrixSize);
actualOut = reshape(inputMatrix, matrixSize);

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