summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/statisticsFunctions/moment
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/statisticsFunctions/moment')
-rw-r--r--2.3-1/src/c/statisticsFunctions/moment/dmoments.c2
-rw-r--r--2.3-1/src/c/statisticsFunctions/moment/smoments.c2
-rw-r--r--2.3-1/src/c/statisticsFunctions/moment/zmoments.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/2.3-1/src/c/statisticsFunctions/moment/dmoments.c b/2.3-1/src/c/statisticsFunctions/moment/dmoments.c
index b9d8564a..779ffa0f 100644
--- a/2.3-1/src/c/statisticsFunctions/moment/dmoments.c
+++ b/2.3-1/src/c/statisticsFunctions/moment/dmoments.c
@@ -8,7 +8,7 @@ double dmoments (double* inp, int size, double ord)
{
double sum = 0;
- for(int i = 0; i < size; i++)
+ for(int i = 0; i < size; i++) // Elements are raised to the order and then their mean is calculated to give moment
{
sum = sum + pow(inp[i], ord);
}
diff --git a/2.3-1/src/c/statisticsFunctions/moment/smoments.c b/2.3-1/src/c/statisticsFunctions/moment/smoments.c
index aee9dc9e..c900d815 100644
--- a/2.3-1/src/c/statisticsFunctions/moment/smoments.c
+++ b/2.3-1/src/c/statisticsFunctions/moment/smoments.c
@@ -8,7 +8,7 @@ float smoments (float* inp, int size, double ord)
{
float sum = 0;
- for(int i = 0; i < size; i++)
+ for(int i = 0; i < size; i++) // Elements are raised to the order and then their mean is calculated to give moment
{
sum = sum + pow(inp[i], ord);
}
diff --git a/2.3-1/src/c/statisticsFunctions/moment/zmoments.c b/2.3-1/src/c/statisticsFunctions/moment/zmoments.c
index 1b847376..b70df707 100644
--- a/2.3-1/src/c/statisticsFunctions/moment/zmoments.c
+++ b/2.3-1/src/c/statisticsFunctions/moment/zmoments.c
@@ -13,7 +13,7 @@ doubleComplex zmoments (doubleComplex* inp, int size, double ord)
{
doubleComplex sum = DoubleComplex(0,0);
- for(int i = 0; i < size; i++)
+ for(int i = 0; i < size; i++) // Elements are raised to the order and then their mean is calculated to give moment
{
sum = zadds(sum,zpows(inp[i], ord));
}