diff options
Diffstat (limited to 'SD-VBS/benchmarks/localization/src/matlab/sumCol.m')
| -rw-r--r-- | SD-VBS/benchmarks/localization/src/matlab/sumCol.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/SD-VBS/benchmarks/localization/src/matlab/sumCol.m b/SD-VBS/benchmarks/localization/src/matlab/sumCol.m new file mode 100644 index 0000000..ad0114e --- /dev/null +++ b/SD-VBS/benchmarks/localization/src/matlab/sumCol.m | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | function ret = sumCol(mat) | ||
| 2 | |||
| 3 | row = size(mat, 1); | ||
| 4 | col = size(mat, 2); | ||
| 5 | |||
| 6 | ret = zeros(row, 1); | ||
| 7 | |||
| 8 | for i=1:row | ||
| 9 | temp = 0; | ||
| 10 | for j=1:col | ||
| 11 | temp = temp + mat(i, j); | ||
| 12 | end | ||
| 13 | ret(i, 1) = temp; | ||
| 14 | end | ||
