summaryrefslogtreecommitdiff
path: root/src/c/statisticsFunctions/moment
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-08-10 20:33:46 +0530
committerAbhinav Dronamraju2017-08-10 20:33:46 +0530
commit5b728d8239b1a1f4467e2485d54c7ed7db1d4f11 (patch)
treed8db631e058bae294362b2087079150569fc9581 /src/c/statisticsFunctions/moment
parent6422b5c0a45161d6571fd6d7077b6d551cbb5e26 (diff)
parent4bc007e5b44a13b582b0275bf7fc6693942ba2ac (diff)
downloadscilab2c-5b728d8239b1a1f4467e2485d54c7ed7db1d4f11.tar.gz
scilab2c-5b728d8239b1a1f4467e2485d54c7ed7db1d4f11.tar.bz2
scilab2c-5b728d8239b1a1f4467e2485d54c7ed7db1d4f11.zip
Merge and functions added
Diffstat (limited to 'src/c/statisticsFunctions/moment')
-rw-r--r--src/c/statisticsFunctions/moment/dmoments.c2
-rw-r--r--src/c/statisticsFunctions/moment/smoments.c2
-rw-r--r--src/c/statisticsFunctions/moment/zmoments.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/c/statisticsFunctions/moment/dmoments.c b/src/c/statisticsFunctions/moment/dmoments.c
index b9d8564a..779ffa0f 100644
--- a/src/c/statisticsFunctions/moment/dmoments.c
+++ b/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/src/c/statisticsFunctions/moment/smoments.c b/src/c/statisticsFunctions/moment/smoments.c
index aee9dc9e..c900d815 100644
--- a/src/c/statisticsFunctions/moment/smoments.c
+++ b/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/src/c/statisticsFunctions/moment/zmoments.c b/src/c/statisticsFunctions/moment/zmoments.c
index 1b847376..b70df707 100644
--- a/src/c/statisticsFunctions/moment/zmoments.c
+++ b/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));
}