summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/matlab/product.m
diff options
context:
space:
mode:
authorleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
committerleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
commit25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 (patch)
treeba80e76d25d9ca9486092e2f6b6d76f0e3352bf7 /SD-VBS/common/matlab/product.m
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/common/matlab/product.m')
-rwxr-xr-xSD-VBS/common/matlab/product.m30
1 files changed, 0 insertions, 30 deletions
diff --git a/SD-VBS/common/matlab/product.m b/SD-VBS/common/matlab/product.m
deleted file mode 100755
index 65548b4..0000000
--- a/SD-VBS/common/matlab/product.m
+++ /dev/null
@@ -1,30 +0,0 @@
1function [matrixOut] = product(matrixIn, direction)
2
3% Initialize matrices
4inputDim = size(matrixIn);
5
6% For input matrix (m,n), we need to multiply horizontally if output matrix
7%is (m). Else, we multiply vertically.
8
9%if direction is 1, we multiply vertically.
10if direction == 1
11 matrixOut = zeros(1, inputDim(2)); %initialize the output matrix
12 for cols = 1:inputDim(2)
13 val = 1;
14 for rows = 1:inputDim(1)
15 val = matrixIn(rows, cols) * val;
16 end
17 matrixOut(cols) = val;
18 end
19
20% else multiply horizontally
21else
22 matrixOut = zeros(inputDim(1), 1); %initialize the output matrix
23 for rows = 1:inputDim(1)
24 val = 1;
25 for cols = 1:inputDim(2)
26 val = matrixIn(rows, cols) * val;
27 end
28 matrixOut(rows) = val;
29 end
30end \ No newline at end of file