summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/c/ffVertcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/common/c/ffVertcat.c')
-rw-r--r--SD-VBS/common/c/ffVertcat.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/SD-VBS/common/c/ffVertcat.c b/SD-VBS/common/c/ffVertcat.c
new file mode 100644
index 0000000..00fa74b
--- /dev/null
+++ b/SD-VBS/common/c/ffVertcat.c
@@ -0,0 +1,36 @@
1/********************************
2Author: Sravanthi Kota Venkata
3********************************/
4
5#include "sdvbs_common.h"
6
7F2D* ffVertcat(F2D* matrix1, F2D* matrix2)
8{
9 F2D *outMatrix;
10 int row1, col1, row2, col2, i, j, k;
11
12 row1 = matrix1->height;
13 col1 = matrix1->width;
14
15 row2 = matrix2->height;
16 col2 = matrix2->width;
17
18 outMatrix = fMallocHandle(row1+row2, col1);
19
20 for( i=0; i<col1; i++)
21 {
22 for (j=0; j<row1; j++)
23 {
24 subsref(outMatrix,j,i) = subsref(matrix1,j,i);
25 }
26 for( k=0; k<row2; k++)
27 {
28 subsref(outMatrix,(k+row1),i) = subsref(matrix2,k,i);
29 }
30 }
31
32 return outMatrix;
33
34}
35
36