Go Down

Topic: [Published on GitHub] Gaussian Class and Moving Average (Read 839 times) previous topic - next topic

Jul 21, 2013, 03:06 am Last Edit: Jul 21, 2013, 02:11 pm by ivanseidel Reason: 1
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:

Code: [Select]
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.

Code: [Select]
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 https://github.com/ivanseidel/Gaussian

Fell free to commit new changes and use it.

Ivan
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

robtillaart

Quote
go to https://github.com/ivanseidel/LinkedList


think the link is not right ;)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Quote
go to https://github.com/ivanseidel/LinkedList


think the link is not right ;)



Now it's Okay =]
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

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.
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy