How can we insert two independent random number to two equations (x,y) contain two parts like this:
x = a* randomnumber1 + b* randomnumber2
y = c* randomnumber1 + d* randomnumber2
these two random number should be independent.
Thank inadvance.
ALosh99
0
Light Poster
Recommended Answers
Jump to PostHow are you generating your random numbers? Show your code please. Assuming you have assigned a random number (usually using the rand() function if C or C++) to randomnumber1 and randomnumber2, then your computation should be correct. You initialize your random number generator with a seed value - often the …
Jump to PostYour code is nearly correct but I am not 100% sure that it is giving your what your want:
So here is your code with some comments -- just to make sure:// This line sets the random number seed. // you only need this call …
All 6 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
ALosh99
0
Light Poster
ALosh99
0
Light Poster
ALosh99
0
Light Poster
StuXYZ
731
Practically a Master Poster
ALosh99
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.