Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: QEI2 PID Watchdog VL53L1X_Filter ros_lib_kinetic
statistics.h
00001 #ifndef statistics_h //improvement: #ifndef _STATISTICS_h (purpose: good coding practice) 00002 #define statistics_h // #define _STATISTICS_h 00003 00004 #include "mbed.h" 00005 00006 // Capitalize the first letter of class name (good coding practice/how to distinguish class from function) 00007 class statistics 00008 { 00009 public: 00010 //Defining default constructor 00011 statistics(int* Input, double dataLength, int firstDataPoint = 0); 00012 //Defining methods 00013 double stdev(); 00014 double mean(); 00015 00016 private: 00017 int* data; //pointer to data 00018 double dataLength; 00019 int firstDataPoint; 00020 00021 00022 }; 00023 00024 #endif
Generated on Sat Jul 16 2022 14:27:07 by
1.7.2