summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/c/fHorzcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/common/c/fHorzcat.c')
-rw-r--r--SD-VBS/common/c/fHorzcat.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/SD-VBS/common/c/fHorzcat.c b/SD-VBS/common/c/fHorzcat.c
new file mode 100644
index 0000000..9845e7c
--- /dev/null
+++ b/SD-VBS/common/c/fHorzcat.c
@@ -0,0 +1,40 @@
1/********************************
2Author: Sravanthi Kota Venkata
3********************************/
4
5#include "sdvbs_common.h"
6
7F2D* fHorzcat(F2D* a, F2D* b)
8{
9 F2D* out_, *out, *c;
10 int rows=0, cols=0, i, j, k, c_1, c_2, r_3, c_3;
11 int r_1;
12
13 r_1 = a->height;
14 c_1 = a->width;
15 cols += c_1;
16 c_2 = b->width;
17 cols += c_2;
18 rows = r_1;
19
20 out = fMallocHandle(rows, cols);
21
22 for(i=0; i<rows; i++)
23 {
24 k = 0;
25 for(j=0; j<c_1; j++)
26 {
27 subsref(out,i,k) = subsref(a,i,j);
28 k++;
29 }
30 for(j=0; j<c_2; j++)
31 {
32 subsref(out,i,k) = subsref(b,i,j);
33 k++;
34 }
35 }
36
37 return out;
38}
39
40