pickn

Version 1.0.0.0 (956 octets) par Richard Medlock
Return P random picks of N items from an input vector A.
2,2K téléchargements
Mise à jour 19 mai 2003

Aucune licence

B = PICKN(A,N,P)

Returns P random Picks of N items from vector A.

PickN assumes that each item can be repelaced after selection.

Example:
A list contains four elements: [1 2 3 4]
Show two possible combinations of choosing 3 items
from the list.

A = [1:4];
N = 3;
P = 2;

B = pickn(A,N,P)

1 3 1
2 4 1

If you specifcy P as the string 'all', then B will contain
all possible permutations.

Citation pour cette source

Richard Medlock (2026). pickn (https://fr.mathworks.com/matlabcentral/fileexchange/3423-pickn), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R13
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Graph and Network Algorithms dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.0.0.0

Typo. 3rd arg was supposed to be P not C. If you have already downloaded the previous version, please change it to P, otherwise there is now a new version available.