From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- SD-VBS/common/matlab/testReshapeFunction.m | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 SD-VBS/common/matlab/testReshapeFunction.m (limited to 'SD-VBS/common/matlab/testReshapeFunction.m') diff --git a/SD-VBS/common/matlab/testReshapeFunction.m b/SD-VBS/common/matlab/testReshapeFunction.m new file mode 100755 index 0000000..1dac432 --- /dev/null +++ b/SD-VBS/common/matlab/testReshapeFunction.m @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.2