Skip to content

Commit

Permalink
Merge pull request #7 from akkoyun/01.02.00
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
akkoyun authored Feb 13, 2022
2 parents 4091f8e + d0ec6c4 commit 6b40eeb
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 203 deletions.
28 changes: 13 additions & 15 deletions examples/Array/Array.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void loop() {
// Set Data
Serial.println("Learning Data...");
float Data_Array[] = {220.14, 221.36, 218.21, 217.6, 215.7, 225.8, 220.14 };
int Data_Size = 7;

// Print Array
Serial.print("Data Array : ");
Expand All @@ -23,22 +24,19 @@ void loop() {
}
Serial.println("");

// Calculate Array Statistics
Stats.Array_Statistic(Data_Array, sizeof(Data_Array));

// Print Stats
Serial.print("Array Sum : "); Serial.println(Stats.Array_Sum);
Serial.print("Array Square Sum : "); Serial.println(Stats.Array_Sq_Sum);
Serial.print("Array Min : "); Serial.println(Stats.Array_Min);
Serial.print("Array Max : "); Serial.println(Stats.Array_Max);
Serial.print("Array Aritmetic Average : "); Serial.println(Stats.Array_AAvg);
Serial.print("Array Geometric Average : "); Serial.println(Stats.Array_GAvg);
Serial.print("Array RMS Average : "); Serial.println(Stats.Array_RMS_Avg);
Serial.print("Array Extended RMS Average : "); Serial.println(Stats.Array_Ext_RMS_Avg);
Serial.print("Array Median : "); Serial.println(Stats.Array_Med);
Serial.print("Array Standart Deviation : "); Serial.println(Stats.Array_SDev);
Serial.print("Array Standart Deviation Error : "); Serial.println(Stats.Array_SDev_Err);
Serial.print("Array Coefficient Factor : "); Serial.println(Stats.Array_Coef);
Serial.print("Array Sum : "); Serial.println(Stats.Array_Sum(Data_Array, Data_Size));
Serial.print("Array Square Sum : "); Serial.println(Stats.Array_Sq_Sum(Data_Array, Data_Size));
Serial.print("Array Min : "); Serial.println(Stats.Array_Min(Data_Array, Data_Size));
Serial.print("Array Max : "); Serial.println(Stats.Array_Max(Data_Array, Data_Size));
Serial.print("Array Aritmetic Average : "); Serial.println(Stats.Array_Aritmetic_Average(Data_Array, Data_Size));
Serial.print("Array Geometric Average : "); Serial.println(Stats.Array_Geometric_Average(Data_Array, Data_Size));
Serial.print("Array RMS Average : "); Serial.println(Stats.Array_RMS_Average(Data_Array, Data_Size));
Serial.print("Array Extended RMS Average : "); Serial.println(Stats.Array_Ext_RMS_Average(Data_Array, Data_Size));
Serial.print("Array Median : "); Serial.println(Stats.Array_Median(Data_Array, Data_Size));
Serial.print("Array Standart Deviation : "); Serial.println(Stats.Array_Standart_Deviation(Data_Array, Data_Size));
Serial.print("Array Standart Deviation Error : "); Serial.println(Stats.Array_Standart_Deviation_Error(Data_Array, Data_Size));
Serial.print("Array Coefficient Factor : "); Serial.println(Stats.Array_Coefficient_Factor(Data_Array, Data_Size));

Serial.print("Sorted Data Array : ");
for (uint8_t i = 0; i < sizeof(Data_Array); i++) {
Expand Down
23 changes: 18 additions & 5 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ Stats KEYWORD1
# Methods and Functions (KEYWORD2)
#######################################

Stream_Statistic KEYWORD2
Data_Clear KEYWORD2
Array_Statistic KEYWORD2
LinearRegression KEYWORD2

Array_Sum KEYWORD2
Array_Max KEYWORD2
Array_Min KEYWORD2
Array_Sq_Sum KEYWORD2
Array_Aritmetic_Average KEYWORD2
Array_Geometric_Average KEYWORD2
Array_RMS_Average KEYWORD2
Array_Ext_RMS_Average KEYWORD2
Array_Bubble_Sort KEYWORD2
Array_Median KEYWORD2
Array_Standart_Deviation KEYWORD2
Array_Standart_Deviation_Error KEYWORD2
Array_Coefficient_Factor KEYWORD2
Array_Average KEYWORD2
Stream_Statistic KEYWORD2
Data_Clear KEYWORD2
LinearRegression KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Statistical",
"version": "1.1.1",
"version": "1.2.0",
"keywords": "Statistical, Max, Min, Average, Regression, Data, Sensor, Slope, Offset",
"description": "Function calculates statistical parameters of data stream and array",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Statistical
version=1.1.3
version=1.2.0
author=Gunce Akkoyun <akkoyun@me.com>
maintainer=Gunce Akkoyun <akkoyun@me.com>
sentence=Statistic, Max, Min, Average, Stream, Regression, Slope, Data, Analyse
Expand Down
Loading

0 comments on commit 6b40eeb

Please sign in to comment.