How Can i Produce a Random mxn Matrix, with pre -specified set of integers?!

 채택된 답변

Wayne King
Wayne King 2013년 10월 14일
편집: Wayne King 2013년 10월 14일
X = randi([0 1],20,20);
X(X==0) = -1;

추가 답변 (0개)

카테고리

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

태그

질문:

2013년 10월 14일

댓글:

2013년 10월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by