필터 지우기
필터 지우기

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?

채택된 답변

Azzi Abdelmalek
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!

Translated by