Re-generate random matrix

조회 수: 1 (최근 30일)
Fahd Alqahtani
Fahd Alqahtani 2018년 4월 12일
댓글: Fahd Alqahtani 2018년 4월 12일
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일
ind=randperm(81)
B=reshape(A(ind),9,9)

추가 답변 (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