Random Element
Version 1.0.0.0 (1,4 ko) par
Skynet
Returns elements randomly selected from any matrix.
RANDELEMENT(ARRAY,N) returns a row of N elements, selected at random (and with replacement) from ARRAY.
[There probably is some toolbox function that does something very similar.]
EXAMPLES:
randelement([0:9],5)
may return [4 8 8 5 2]
randelement({'a' 'b' 'c' 'd' 'e' 'f'},2)
may return {'f' 'd'}
Citation pour cette source
Skynet (2026). Random Element (https://fr.mathworks.com/matlabcentral/fileexchange/6644-random-element), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R14SP1
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et MATLAB Answers
Tags
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0.0 | Made minor update to description and comments. |
