Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.887.061 Times

Shuffle (Sripts) 1.0

  Date Added: July 20, 2013  |  Visits: 200

Shuffle (Sripts)

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 downloads)



Shuffle - Random permutation of array elementsThis function is equivalent to X(RANDPERM(LENGTH(X)), but 50% to 85% faster. It uses D.E. Knuth's shuffle algorithm (also called Fisher-Yates) and the cute KISS random number generator (G. Marsaglia). While RANDPERM needs 2*LENGTH(X)*8 bytes as temporary memory, SHUFFLE needs just a fixed small number of bytes.1. Inplace shuffling: Y = Shuffle(X, Dim)INPUT: X: DOUBLE, SINGLE, CHAR, LOGICAL, (U)INT64/32/16/8 array. Dim: Dimension to operate on. Optional, default: 1st non-singleton dimension.OUTPUT: Y: Array of same type and size as X with shuffled elements.2. Create a shuffle index: Index = Shuffle(N, 'index', NOut)This is equivalent to Matlab's RANDPERM, but much faster, if N is large and NOut is small.INPUT: N: Integer number. NOut: The number of output elements. Optional, default: N.OUTPUT: Index: [1:NOut] elements of shuffled [1:N] vector in the smallest possible integer type.3. Derangement index:Index = Shuffle(N, 'derange', NOut)Equivalent to the index method, but all Index[i] ~= i. A rejection method is used: Create an index vector until a derangement is gained.EXAMPLES: R = Shuffle(1:8) % [8, 1, 2, 6, 4, 3, 5, 7] R = Shuffle('abcdefg') % 'efbadcg' R = Shuffle([1:4; 5:8], 2) % [3, 2, 1, 4; 6, 8, 7, 5] I = Shuffle(8, 'index'); % UINT8([1, 5, 7, 6, 2, 3, 4, 8])Choose 10 different rows from a 1000 x 100 matrix: X = rand(1000, 100); Y = X(Shuffle(1000, 'index', 10), :);Operate on cells or complex arrays: C = {9, 's', 1:5}; SC = C(Shuffle(numel(C), 'index')); M = rand(3) + i * rand(3); SM = M(:, Shuffle(size(C, 2), 'index'))NOTES: There are several other shuffle functions in the FEX. Some use Knuth's method also, some call RANDPERM. This implementation is faster due to calling a compiled MEX file and it has a smaller memory footprint. The KISS random numbers are much better than the RAND() of the C-standard libs.Run the unit-test TestShuffle to test validity and speed (see screenshot).Tested: Matlab 6.5, 7.7, 7.8, 32bit, WinXP,Compiler: LCC 2.4/3.8, BCC 5.5, Open Watcom 1.8, MSVC 2008.Compatibility to 64 bit, Linux and Mac is assumed.Pre-compiled Mex: http://www.n-simon.de/mex

Requirements: No special requirements
Platforms: Matlab
Keyword: Choose Cshufflenumelc Matrix Operate Rand Shuffle Uint Xshuffle
Users rating: 0/10

License: Shareware Size: 20.48 KB
USER REVIEWS
More Reviews or Write Review


SHUFFLE (SRIPTS) RELATED
Shell Enhancements  -  Intelore Screensavers 1.0
These screensavers were created by using Flash .SCR Master software and there are currently 3 to choose from. Matrix- Based on the opening scene of "The Matrix", Space Jump - The Galaxy by storm! and Cyber Fire - this one allows you to have a fire...
400 KB  
Nature  -  Water Scenes Screensaver 2.0
The scenes of the ponds and lakes will calm you, while the river scenes will inspire you. A beautiful music score gently plays while the scenes are displayed. Includes 10 different scenes. Options let you choose redraw speed, add effects,...
527 KB  
Screen Savers  -  Cemetery Scenes Screensaver 1.0
The scenes of the cemeteries and graves will haunt you. An eerie music score plays while the scenes are displayed. Options let you choose redraw speed, add effects, shuffle the images, mute the music and more.
966 KB  
Development Tools  -  UDFactor 1.0
[U D] = UDFactor(P) returns matrices U and D such that U.'*D*U = P[U D] = UDFactor(P,uflag) returns matrices U and D such that U*D*U.' = Pwhen uflag is set to TRUE. Setting uflag to FALSE is equivalent torunning UDFactor with only one argument.The...
10 KB  
Games  -  Bumblebee Breakout 1.0.0.0
Puzzit is a game in the tile-matching genre, but unlike match-three games like Bejeweled, Candy Crush Saga and Zuma, Puzzit challenges players to flip disks to create whole rows of the same color. When all of the disks in a row are the same color,...
9 MB  
Music  -  Moods 'n Music 1.2.1.0
Moods 'n Music player enables you to select songs from your local Windows Phone Music Library using a selection criteria and play them in random order. Forget the static playlists that are difficult to maintain! You have the ability to create an...
6 MB  
Games  -  Puzzit 1.0.0.0
Puzzit is a game in the tile-matching genre, but unlike match-three games like Bejeweled, Candy Crush Saga and Zuma, Puzzit challenges players to flip disks to create whole rows of the same color. When all of the disks in a row are the same color,...
17 MB  
Libraries  -  Math::Matrix 0.5
Math::Matrix can multiply and invert Matrices. The following methods are available: new Constructor arguments are a list of references to arrays of the same length. The arrays are copied. The method returns undef in case of error. $a = new...
6.14 KB  
Development Tools  -  Matrix Convolution with Sub-Pixel Resolution 1.0
Tristan UrsellSub-pixel Resolved 2D ConvolutionMarch 2012 matout=matoverlay(mat1,mat2,x,y); This function takes an input matrix mat1 and creates an image of thematrix mat2 at the position (x,y) in mat1. If (x,y) are floats, then theimage is a...
10 KB  
Utilities  -  Media Shuffle 1.1.1
Media Shuffle is a simple, free application that allows you to play multiple media files from a large collection at random. Just point the app to a root folder of sub-folders containing your media file collections, and it provides you...
337.92 KB  
NEW DOWNLOADS IN SCRIPTS, DEVELOPMENT TOOLS
Scripts  -  Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers....
5.49 MB  
Scripts  -  B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Sign-up Account (Registration of account). Lead generation tools (for the sellers). Email verification to...
5.49 MB  
Scripts  -  B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or...
5.49 MB  
Scripts  -  Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start...
5.49 MB  
Scripts  -  Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed...
5.49 MB  
Development Tools  -  VMP Viewer 1.0
This is a very rudimentary tool to visualize the VMP files generated by BrainVoyager. Useful to share files with people who do not have BV.
10 KB  
Development Tools  -  Sending reports and timestamped file by emailing 1.0
main executing reference usage:[1] usage_send_mail.mIllustrates email sending with multiple separate files or single timestamped tar file. Attachment failure is properly handled, with continuation of report emailing without the attachment.[2]...
768 KB  
Development Tools  -  IrisMVC 2.0 rc1
IrisMVC is an OOP PHP framework that developers can use as a strong and secure foundation to build on various web applications following the Model-View-Controller (MVC) pattern. It provides the basic functionality developers need, without...
51.2 KB  
Development Tools  -  7-Zip for Script 4.42
7-Zip is a file archiver with a high compression ratio.Features:- High compression ratio in new 7z format with LZMA compression- Supported formats:- Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR- Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM,...
624.64 KB  
Development Tools  -  Barnardextest 1.0
This file, as the Fisher's exact test, performs the exact probability test for a table of frequency data cross-classified according to two categorical variables, each of which has two levels or subcategories (2x2). It is a non-parametric...
10 KB