From 4c92529e0c6b84d90356e4a0511bc4c939d24ee1 Mon Sep 17 00:00:00 2001 From: Abhinav Dronamraju Date: Thu, 3 Aug 2017 21:55:47 +0530 Subject: Hank ADDED --- 2.3-1/src/c/signalProcessing/hank/dhanka.c | 110 +++++++++++++++++++++++++++++ 2.3-1/src/c/signalProcessing/hank/shanka.c | 110 +++++++++++++++++++++++++++++ 2 files changed, 220 insertions(+) create mode 100644 2.3-1/src/c/signalProcessing/hank/dhanka.c create mode 100644 2.3-1/src/c/signalProcessing/hank/shanka.c (limited to '2.3-1/src/c/signalProcessing/hank') diff --git a/2.3-1/src/c/signalProcessing/hank/dhanka.c b/2.3-1/src/c/signalProcessing/hank/dhanka.c new file mode 100644 index 00000000..1857cc20 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hank/dhanka.c @@ -0,0 +1,110 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + +#include "hank.h" +#include "types.h" +#include "ones.h" +#include "kron.h" +#include "addition.h" +#include "matrix.h" + +void dhanka(int m, int n, double*seq_conv, int row, int col, double*out) +{ + int mr, nr; + mr= m* row; + nr= n* row; + double ones1[1*nr]; + double ones2[m*1]; + double temp1[mr*1]; + double temp2[1*nr]; + double middle1[m*nr]; + double middle2[m*nr]; + double index[m*nr]; + double final[row*m*nr]; + + + donesa(ones1, 1 , nr); + donesa(ones2, m , 1); +int j=0; +for(int i=1; i< mr+1; i= i+row) + { + temp1[j]=i; + j++; + printf("%d", i); + } +for(int j=0;j< nr; j++) + temp2[j]=j; + + dkrona(ones1, 1 , nr, temp1, m , 1 , middle1); + dkrona(temp2, 1 , nr, ones2, m , 1 , middle2); + + dadda(middle1, m*nr, middle2, m*nr, index); + + +for(int i=0; i< m*nr; i++) + { + + for(int j=0; j