pickn

Return P random picks of N items from an input vector A.
2,2K descargas
Actualizado 19 may 2003

Sin licencia

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.

Citar como

Richard Medlock (2024). pickn (https://www.mathworks.com/matlabcentral/fileexchange/3423-pickn), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R13
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Graph and Network Algorithms en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
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.