How can I generate multiple unique random numbers?
Hello
I am trying to generate multiple random numbers between a given set of numbers (1-52) and do not have the same number generated twice within this group. I can compare the numbers of last and next with the function to compare, but how would I go about comparison of all numbers generated without using a huge list of shift registers...
Any help/ideas are welcome and appreciated.
Jason
Solved my problem. IM passing the random number through a registry to offset to each case and build a table every time. I then searches the table for the new random number. If the number is not found I get a value of-1, another thing is an index value of 0-everything. If a comparator greater than (-1) indicates that the same number is in the table and then I can raise this matter until the same number is not found.
Kind regards
Jason
Tags: NI Software
Similar Questions
-
How can I generate a single random number on a button for use in a VI?
I'm creating a new VI and need a new random number every time that I hit a button... it will eventually be replaced by externally triggered en boolean, but for now, I would like to just press a button, get a new number, use this number, click the button, get a new number (previous deletion), etc etc.
Thank you
-Steve
Just to add to what SAM has shown you can generate in a different ranges without limit it... It's just a very simple logic... Try this...
-
How to get the unique random numbers each time in AS3
I searched but not able to get satisfactory results
use:
var tempArray:Array =]
for (var i: uint = 0; i<>
tempArray.push (i);
}
Shuffle (tempArray);
You can now browse tempArray for random integers from 0 to moveXml.movie.length () - 1
function shuffle(a:Array) {}
var p:int;
var t: *;
var ivar:int;
for (ivar =. Length-1; Ivar > = 0; Ivar-) {}
p = Math.Floor ((Ivar+1) * Math.Random ());
t = a [ivar];
a [ivar] = a [p];
a [p] = t;
}
} -
How can I generate a list of all the albums I have in my music library
How can I generate a list of all the albums I have in my music library
but, if you only do this several times, you can use this procedure instead:
Open a command prompt in your folder music [shift-right click on the name of the folder in the Windows Explorer & select a window of commands here]
Run the dir/ad/b /s > AlbumList.txt
Then open the text file in Word and he put away: -.
Replaceyourusernamewith Nothing \Music\ C:\Users\
Replace-with ^ t [the code of the tab]
Select all, convert table to use the trademarks of the tab as column separators
Select column 1 [the artists], and delete
If there is garbage in all 3 columns - go just delete the columns thus
That should leave a unique list of album names
-
How can I print multiple different .ai files on a single page in Illustrator CS6?
How can I print multiple different .ai files on a single page in Illustrator CS6? I have all the files organized by organizing Documents > tile all in the grid and I want to print files in this format, so that they can all be seen at the same time when printed on a single page.
General information, it's that I have 16 drawings of different CAD I converted and edited in illustrator. I do basically a plank-contact with all 16 drawings so that they can be examined on a sheet of paper after printing. Each drawing is in its own unique file but I did not understand how to put everything on one page for printing.
Try to do with the bridge. You cannot print all document tiled windows.
-
How can I select multiple messages at the same time for archiving
I want to archive multiple messages in a folder from archive. How can I select multiple messages at once?
To select a block of eg: 10 emails.
- Click on the first email
- Hold down the SHIFT key and click the last email.
- This will highlight all in the interval
To hightlight all the emails in a folder.
- Click on the first email to focus.
- Press on and hold down the 'Ctrl' key and press 'A '.
- This will highlight all emails.
To select several emails:
- Press and hold down the 'Ctrl' key and then use the mouse to select multiple e-mails
- they will appear as "conversations in the messages pane.
- Click on archives.
Info on setting up your archive' Options ': '.
-
4655 HP Office Jet: How can I fax multiple pages using the hp officejet 4500 desktop computer
How can I fax multiple pages using the hp officejet 4500 desktop that you just bought
can you please email me at [removed personal information]
-
How can I move multiple bookmarks to a folder in a new folder?
Re: safari yosmite
How can I move multiple bookmarks to a folder in a new folder?
Go up that favorite-> edit bookmarks. Then go up to that favorite-> add bookmark folder.
Right-click on the new folder, and then select "Rename". Name you want to reflect the bookmarks that will be in it.
Then, go to the folder that contains the bookmarks that you want to move, click on it while pressing the command key. Drag them out of this folder and the new folder.
-
HP5610xi: Using a HP 5610xi, how can I scan multiple pages into a single file?
Using a HP 5610xi, how can I scan multiple pages into a single file?
Hello
Thank you for using the HP Forums.Can try this software:
HP extended Scan
FTP://FTP.HP.com/pub/scanners/HPScanExt/HPScanExt.msiOnce it has downloaded and installed, go to start > all programs > HP > HP Scan extended > Run "HP Scan extended.
This relevant resource will show you how to scan multiple pages into a single file:
HP Officejet Pro 6960 series: scan a document of 6 pages 2 sides using the ADF
Let us know if it works!
-
How can I get a subarray of numbers from a table?
I have a simple VI...
First generate a 2D random numbers table. This 2D chart, I have to show only numbers in a table 1 d.
Thank you very much!
Here's a way...
Auto index table 2D using a nested FOR loop (FOR inside a loop FOR). If the table element contains no remains divided by 2, then it is an even number so only will be added to your table 1 d.
It's stuff right in front...
Try a combination of the following labVIEW
Tips:
-For loops
-Quotient & rest
-= 0
-Shift register
-Build table
Stroke
(There may be solutions to this problem better/other/more effective and less effective etc. etc.)
-
How can I recover multiple deleted items, I have not deleted the permenantly?
How can I recover multiple deleted items, I have not deleted the permenantly?
Hello
Have you looked in the trash?
Recover files from the Recycle Bin - Vista
http://Windows.Microsoft.com/en-us/Windows-Vista/recover-files-from-the-Recycle-BinRecover files from the Recycle Bin - Windows 7
http://Windows.Microsoft.com/en-us/Windows7/recover-files-from-the-Recycle-BinHow to restore previous Versions of a file and the folder of Vista (Ultimate, Business and Enterprise)
http://www.Vistax64.com/tutorials/122127-previous-versions-shadow-copy.htmlHow to restore files and folders in Windows 7 with previous Versions
http://www.SevenForums.com/tutorials/85679-previous-versions-restore-files-folders.html----------------------------------------------------------------------------------------------------------------------------
This could help you recover a file, or a previous version (all versions of Vista and Windows 7).
http://www.ShadowExplorer.com/ShadowExplorer - recover lost files and folders (Vista and Windows 7)
http://www.SevenForums.com/tutorials/132087-ShadowExplorer-recover-lost-files-folders.html----------------------------------------------------------------------------------------------------------------------------
Recuva - free - recovers files deleted from your Windows computer, Recycle Bin,
map of the camera digital or MP3 player. And it's free!
http://www.Piriform.com/RecuvaRecuva - Forums - help here
http://Forum.Piriform.com/I hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">->
-
How can I generate modulated amplitude signal?
How can I generate modulated amplitude signal?
I got this VI examples NOR but in this VI "m message signal .vi is missing. So, how can I generate missing VI or VI full for the Amplitude modulation signal using 5441 PXI and PXI-5610 as upconvertor. If possible guide me steps to generate.
Thank you and best regards
Isabelle Kodgirwar
Graduate student
University of Texas at Arlington.
Hi Aron,
-
How can I play multiple instances of video (no problem reading of 12 movies at the same time, at the opening of the 13th film the problem only starts), the classic use of media player in windows XP? I was able to do all the time! It has to do with the codec?
If yes what codec plays multiple instances of Media Player Classic in windows XP?
I get the same problem with VLC all that needs to be checked on preferences is checked in the two VLC & MPC!Hello
Multiple instances of Media Player is not supported in version 7 and greater.
· What version of Windows Media Player you have installed?
· Are instances that you are referring to the bodies shipped?
· You use any third-party software to run multiple instances?
-
How can I move multiple photos to a new folder I created without doing it one at a time?
How can I move multiple photos in a new file instead of a folder a time? I've been clicking and dragging each photo in the folder of don't. I have to be a faster, more simple way and I can not find this way
Post proposed by the facilitator for the appropriate forum placed
First, select the photo and press Ctrl and the C key at the same time, when you press the fences to hit keys Ctrl and V photos simultaneously.
-
How can I add multiple e-mail on my account Outlook 2013 accounts
How can I add multiple e-mail on my account Outlook 2013 accounts
Re-post Office/Outlook 2013 group and not to the generic group yo posted at.
http://Office.Microsoft.com/en-GB/Outlook-help/add-an-email-account-HA102809480.aspx
Maybe you are looking for
-
difference of phase for LabView
Hi guys,. I need help in this program I am writing. I'm trying to calculate the difference in phase between two different simulated sinusoids. I searched online and found out that I could do that using retrieves your unique information and subtractin
-
When I try to update windows I get this error «Windows Update error 80072efe»
Hello I installed 2 days ago to my new PC windows 7. After the installation is complete, I tried to update windows for the first time and every time I get this error: «Windows Update error 80072efe» I google the error and I saw that a lot of people h
-
Startup problem Acer e1 linux 510 model
I bought acer aspire model E1 510 with linux preinstall. I want to install windows 7 or windows 8 inside. But he has only UEFI boot mode option in the bios. (no mode legecy). I can't start fron dvd rom
-
I need some drivers for amd radeon hd 7650 m
HelloW, my English is not very good, but I try to expose my problem. I have laptop HP 4540 s with amd radeon hd 7650 m and Windows 7 Ultimete and I cannot find the drivers for this video card. This adapter does not work. What should I do? Thank you!
-
506th Cisco multiple external IP addresses?
Hello Is it possible to define several public addresses on the external interface of a Cisco Pix 506th? The old firewall would take requests in ony four IP addresses, and then we had a NAT that would direct traffic. It's a bit like DMZ a poor man. No