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/testProductFunction.m | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 SD-VBS/common/matlab/testProductFunction.m (limited to 'SD-VBS/common/matlab/testProductFunction.m') diff --git a/SD-VBS/common/matlab/testProductFunction.m b/SD-VBS/common/matlab/testProductFunction.m new file mode 100755 index 0000000..682a005 --- /dev/null +++ b/SD-VBS/common/matlab/testProductFunction.m @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.2