edit-selecting random values
이전 댓글 표시
I have a 10x10 matrix,i need 3 x10 ,but the corresponging column values must not change
if u r selecting any elememt from ist row that corresponging column values must not change
채택된 답변
추가 답변 (1개)
Walter Roberson
2012년 1월 13일
It looks to me as if the answer should just be
p = randperm(size(A,1));
out = A(p(1:3),:);
카테고리
도움말 센터 및 File Exchange에서 Sparse Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!