[Published on GitHub] Gaussian Class and Moving Average

Hi folks,

After a lot of work, I could manage to make a Gaussian "simple" enough to use and implement almos everything.

In this Library summing Gaussians is really easy, like this:

Gaussian g1 = Gaussian(10, 30.4);

Gaussian result = g1 + Gaussian(30, 40);

There is also a Moving Average class, called "GaussianAverage". It works great with Gaussians and also simple values.

GaussianAverage myAverage(10); // 10 samples to keep track of

myAverage += Gaussian(32, 2.45);
myAverage += 10; // Automaticaly adds a Gaussian with Maximum variance

Gaussian average = myAverage.process();

For more information and a very detailed documentation, go to GitHub - ivanseidel/Gaussian: Library that makes Gaussian work easy to use with C++ and Arduino

Fell free to commit new changes and use it.

Ivan

go to GitHub - ivanseidel/LinkedList: 🔗 A fully implemented LinkedList made to work with general Microcontrollers and Arduino projects

think the link is not right :wink:

robtillaart:

go to GitHub - ivanseidel/LinkedList: 🔗 A fully implemented LinkedList made to work with general Microcontrollers and Arduino projects

think the link is not right :wink:

Now it's Okay =]

Two more methods implemented:

  • double Gaussian::plot(double x) - Returns the probability of 'x'.
  • double Gaussian::random() - Returns a normaly distributed value with the mean and variance of the Gaussian.

Useful for ploting and generating random Gaussian distributed values.