Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Generating Non Repetitive Random Numbers

Status
Not open for further replies.

nick_533

Junior Member level 3
Joined
Mar 29, 2006
Messages
26
Helped
0
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,515
non-repetitive random numbers

Hello guys can any one help me with generating non repetitive random numbers.
 

All rand() like functions in any language is naturally repetitive.Generating random numbers needs an input for generating a series of random numbers.
The best way for making qusi non-repetetive random numbers is to use a timer as an argument for rand function.
In all languages this can be done with a function.
For example in Qbasic it can be done with RANDOMIZE TIMER function!
 

    nick_533

    Points: 2
    Helpful Answer Positive Rating
I do not think use different argument like time can promise a different result in random function.

for this problem, I think you can use random to generate a file like 1.txt, one number each line.

then use
uniq -u 1.txt >2.txt

to get the result you want.

here uniq is a linux command
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top