VChooseKRO
- Downloads:
- Views:
- Rating:

VChooseKRO(V, K) creates a matrix, which rows are all permutations created by choosing K elements of the vector V with order and with repetitions.
INPUT:
V: Array of class DOUBLE, SINGLE, (U)INT8/16/32/64, LOGICAL, CHAR.
Prefer (U)INT8 or (U)INT16 for speed.
K: Number of elements to choose.
OUTPUT:
Y: Matrix of size [NUMEL(V)^K, K].
Y has the same class as the input V.
EXAMPLES:
Choose 2 elements from [1,2,3]:
VChooseKRO(1:3, 2) ==> [1,1; 1,2; 1,3; 2,1; 2,2; 2,3; 3,1; 3,2; 3,3]
For speed cast the input to integer types if possible:
Y = double(VChooseKRO(int16(1:1000), 2));
is faster than:
Y = VChooseKRO(1:1000, 2);
To get the permutations of cell arrays, permute the index:
C = {'a', 'b', 'c', 'd'};
C2 = C(VChooseKRO(1:4, 2))
==> C2 = {'a', 'b'; 'a', 'c'; 'a', 'd'; 'b', 'c'; 'b', 'd'; 'c', 'd'}
This MEX version is faster than NPERMUTEK and the more general COMBINATOR of Matt Fig: ~8 times for small arrays, ~2 times for (N=2000, K=2), ~10 times for (N=2, K=16, Class=INT8). COMBN of Jos is again slower than Matt's functions and it does not handle INT classes. See screen shot.
Tested: Matlab 6.5, 7.7, 7.8, WinXP, Compilers: BCC5.5, LCC2.4/3.8, Open Watcom 1.8
The unit-test TestVChooseKRO should be called after compiling. It compares the speed of VChooseKRO with COMBN, NPERMUTEK and COMBINATOR, if these files are found in the path.
See also: VChooseK (no repetitions, no order):
http://www.mathworks.com/matlabcentral/fileexchange/26190
I'd appreciate suggestions for improvements and bug reports sent through email - thanks
Free download from Shareware Connection - VChooseKRO(V, K) creates a matrix, which rows are all permutations created by choosing K elements of the vector V with order and with repetitions.
Version: 1.0 | Size: 10 KB | Platform: Matlab, Scripts
Released Date: 26-01-2013 | Rating: 0 | Title: VChooseKRO
Author Url: http://www.mathworks.com
Program Info Url: http://www.mathworks.com
Download Url: http://www.mathworks.com/matlabcentral/fx_files/26242/1/VChooseKRO.zip
ScaleTime - ScaleTime - fast linear matrix interpolation
DateStr2Num - DATESTR2NUM - Fast conversion of DATESTR to DATENUM
FilterM - FilterM, FiltFiltM: Fast digital filter
strncmpr - Compare last N chars of strings or cell strings
Patch FILTFILT - If applied to a matrix, the function FILTFILT (Signal Processing Toolbox) calls itself recursively for each column.
SimpleTest
WordPress Auto Poster Plugin
Professional Simulink Audio Equalizer
PHP Print / Echo
Ends Smart Form
Output buffering, and how it can change your life
ScriptCase - PHP Code Generator
Advanced Istaller for Java
Wind Turbine Model
FORMfields - The PHP Framework
C to C++ Converter
C++ Compiler
RTFGen - the PHP RTF generator
Cumulative Mann-Kendall trend test
Affiliate Programs
Animation
Auctions
Audio Systems
Banner Rotation
Blog
Bulletin Boards & Forums
Business & Enterprise
Buttons
Calendars & Events
Charts & Graphs
Chat
Classified Ad Managers
Communication
Mcafee Dat File Tested Honeywell
Back Tested Forex
Spain Proxy Tested
Truler Tested
VChooseKR - VChooseKR(V, K) creates a matrix, which rows are all combinations created by choosing K elements of the vector V without order and with repetitions
Open Source Performance Libs - A set of functions, macros and classes to handle platform specific features in a platform independent way.
BestAddress HTML Editor - Easily create your websites using this multi-award-winning HTML editor from Multimedia Australia. Over 70 functions including live split-screen previewing, code securing, spell checking and tutorials make it your number one choice in Web development.
PowerWord - PowerWord is easy to use with powerful functions. It supports on-screen word
PHP Cad and Drawing Program. - A CAD/painting program written in PHP. The user requires no detailed drawing skill. All objects are functions placed on the screen by defining one or two points with parameters for the object. Produces .png-.jpg-.gif(animated)-.mpg-.pov pictures.
Shareware Connection periodically updates pricing and software information of 'VChooseKRO' from company source 'Jan Simon' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using 'VChooseKRO' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of VChooseKRO.
SnapCrab - Nearly every PC users need to take screenshots from time to time, whether it is for personal or professional needs. While using the basic Windows screenshot capture method is available, it is not adequate for everyone. When you want to capture ...
Nuance 4 Dragon Dictate Mac - While Mac users resort to using third party apps for image editing or video editing needs, they are not bothered much about voice dictation software. This has also got to do with the fact that latest versions of OS X including Mountain Lion ...
WWPass BlackBook and Personal Secure Storage - With time, PC security is turning out to be more complex and tedious matter. You can no longer rely on security apps but ensuring privacy of data is also important. While many password manager apps offer secure data encryption options, losing the ...
Sony Movie Studio 13 Platinum - Sony enjoys a prime position in consumer level media software development and its Movie Studio has a large fan following. However, in recent years competition from Adobe and Corel has caught up. The recent overhaul of Sony’s video editor ...
Avast Endpoint Protection Suite Plus - PC security has become a vital aspect of computing nowadays and business users face the heat more than home users. While installing and handling a standalone antivirus suite is neither tedious nor time consuming, the scenario is different in ...
PCMark 8 - Not every PC user would have penchant for running new benchmarks and benchmarking software in their computers. It is only hardcore gamers and seasoned users who like tinkering around with various settings in PC benchmarking tools. Such apps also ...
PureSync Personal - When you use computers, there is no way you can escape using specialized third party software. These need to be used for various needs including office productivity, web access, taking back-up and ensuring proper synchronization across multiple ...
Dragon NaturallySpeaking Standard - No matter what type of computer you use, it becomes necessary to use keyboard for typing. This is the case with average home users as well as network administrators working in professional setups. Would not it be nice if you could give your hands ...
Protector Plus 2014 (32-bit) - Without using suitable security software in PC, you cannot have peace of mind nowadays. Increasing instances of malware attacks and attacking exploits have prompted average PC users to resort to using antivirus and security suites for both home ...
TrustPort Tools - Nowadays, PC users need to deal with several types of third party apps to ensure security and privacy of data. From encrypting files to getting rid of sensitive data, the needs can be numerous. There are many such tools that can be used in this ...

