Hi
I have a matrix A (9X9) and I want to generate a new matrix B using the same matrix of A and should be distributed randomly and each number should be used once to generate matrix B.

 채택된 답변

David Fletcher
David Fletcher 2018년 4월 12일
편집: David Fletcher 2018년 4월 12일

3 개 추천

ind=randperm(81)
B=reshape(A(ind),9,9)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Random Number Generation에 대해 자세히 알아보기

질문:

2018년 4월 12일

댓글:

2018년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by