diff options
author | Abhinav Dronamraju | 2017-08-01 20:25:57 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-08-01 20:25:57 +0530 |
commit | a2d79ab7eb8ae40367200e00a8401a697708c42c (patch) | |
tree | dc4adf272bdcab23e01c976babdf67151438427b /2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c | |
parent | e837bc137eb35bd77e31530436d7727a500d45e0 (diff) | |
parent | 08907f873ad769a7f2326d15c9a20a84bcef5008 (diff) | |
download | Scilab2C-a2d79ab7eb8ae40367200e00a8401a697708c42c.tar.gz Scilab2C-a2d79ab7eb8ae40367200e00a8401a697708c42c.tar.bz2 Scilab2C-a2d79ab7eb8ae40367200e00a8401a697708c42c.zip |
Merged
Diffstat (limited to '2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c')
-rw-r--r-- | 2.3-1/src/c/statisticsFunctions/moment/dmomentrowa.c | 18 |
1 files changed, 18 insertions, 0 deletions
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 <stdio.h> +#include <stdlib.h> +#include <math.h> +#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); + } + +} |