I am trying to add in an error model into my simulation. I come across this term "seed" in many articles and i do not have much knowledge on it. While i understand that this is needed to generate random noise values but i wish to know how do i define/calculate this "seed" value? Please advise.

Views: 730

Reply to This

Replies to This Discussion

It's a starting value that initializes the pseudorandom sequence generator. Two identical seeds will produce the same "random" sequence, so if you want to have this random noise to be different every time you run the simulation, then you'll have to provide a different seed every time (for example current time). If that is not a problem, use a constant instead, e.g. 0.
It's just a number. Most random() functions require a "seed" number - because they aren't truly random-number functions they are just produce pseudo-random number sequences. If you run the program twice with the same value as "seed", you will get the same sequence of numbers from random(). The solution is to choose a different number for "seed" each time - perhaps get the system time and use the number of microseconds as the "seed" value to the first random() call.

Reply to Discussion


© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service