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/dmomentrowa.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c (limited to '2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c') diff --git a/2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c b/2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c new file mode 100644 index 00000000..811aac39 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include "moment.h" + +void dmomentrowa (double* inp, int row, int col, double ord, double* out) +{ + double vect[row]; + for(int i = 0; i < col ; i++) + { + for(int j = 0; j < row ; j++) + { + vect[j] = inp[j + i*row]; + } + out[i] = dmoments(vect, row, ord); + } + +} -- cgit