You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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'}
Cite As
Skynet (2026). Random Element (https://ch.mathworks.com/matlabcentral/fileexchange/6644-random-element), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (1.4 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | Made minor update to description and comments. |
