필터 지우기
필터 지우기

Selecting random number from martrix

조회 수: 1 (최근 30일)
Pat
Pat 2011년 11월 9일
I have a matrix of 10rows and 10 columns,i want to select 5 rows randomly ,please help

채택된 답변

signal
signal 2011년 11월 9일
one way to do it is
row = randperm(10);
row = row(1:5);
result = your_matrix(row,:);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by