From 08907f873ad769a7f2326d15c9a20a84bcef5008 Mon Sep 17 00:00:00 2001 From: Brijeshcr Date: Tue, 1 Aug 2017 16:18:48 +0530 Subject: Added Moment --- 2.3-1/src/c/statisticsFunctions/moment/dmomentcola.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 2.3-1/src/c/statisticsFunctions/moment/dmomentcola.c (limited to '2.3-1/src/c/statisticsFunctions/moment/dmomentcola.c') diff --git a/2.3-1/src/c/statisticsFunctions/moment/dmomentcola.c b/2.3-1/src/c/statisticsFunctions/moment/dmomentcola.c new file mode 100644 index 00000000..538328e3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/moment/dmomentcola.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "moment.h" + +void dmomentcola (double* inp, int row, int col, double ord, double* out) +{ + double vect[col]; + for(int i = 0; i < row ; i++) + { + for(int j = 0; j < col ; j++) + { + vect[j] = inp[i + j*row]; + } + out[i] = dmoments(vect, col, ord); + } + +} -- cgit