lundi 2 novembre 2015

Mock temperature by generating random numbers in C#

We're designing sensors that monitor cows' temperature but since they're not ready yet, I need to generate mock values. A healthy cow's normal temperature lies within 38.1 to 39.0. I want a 80-20 probability; 80 signifying normal temperature, and 20 signifying 39-42. How can I do this?

Till now, I was simply doing this in my C# program (tv=temperature value):

Random rnd = new Random();
int tv = rnd.Next(30, 40); 

But now, I need to generate accurate readings.




Aucun commentaire:

Enregistrer un commentaire