summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/statisticsFunctions/moment/smomentcola.c
blob: 4255782ca74aa50b14d96cbac727d943dbe2f222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "moment.h"

void smomentcola (float* inp, int row, int col, double ord, float* out)
{
    float vect[col];
    for(int i = 0; i < row ; i++)
    {
	for(int j = 0; j < col ; j++)
	{
	    vect[j] = inp[i + j*row];
	}
	out[i] = smoments(vect, col, ord);
    }

}