Prevent repeating number in any matrix row
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hi all, If I have any random matrix: [2 4 5 6 4; 3 5 3 2 6] The numbers 4 and 3 are repeated in rows one and two, respectively. I would like some help in being able to prevent this repeating. The randperm function is okay for doing the requirement in vectors. Is it okay here in a matrix? your help is appreciated. Hany
댓글 수: 0
답변 (1개)
Andrei Bobrov
2017년 7월 12일
편집: Andrei Bobrov
2017년 7월 12일
[~,out] = sort(rand(2,5),2);
댓글 수: 1
hany salem
2017년 7월 12일
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!