Is it possible to obtain a random sample of values from a matrix without the randsample tool?
조회 수: 1 (최근 30일)
이전 댓글 표시
Is it possible to obtain a random sample of values from a matrix without the randsample tool?
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2012년 11월 24일
편집: Azzi Abdelmalek
2012년 11월 24일
A=magic(6);
out=A(randi(numel(A),1))
if you want 3 values for example
out=A(randi(numel(A),3,1))
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!