Random Element

버전 1.0.0.0 (1.4 KB) 작성자: Skynet
Returns elements randomly selected from any matrix.
다운로드 수: 2.3K
업데이트 날짜: 2005/4/25

라이선스 보기

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'}

인용 양식

Skynet (2024). Random Element (https://www.mathworks.com/matlabcentral/fileexchange/6644-random-element), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14SP1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Made minor update to description and comments.