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

 Akzeptierte Antwort

Wayne King
Wayne King am 14 Okt. 2013
Bearbeitet: Wayne King am 14 Okt. 2013
X = randi([0 1],20,20);
X(X==0) = -1;

Weitere Antworten (0)

Kategorien

Mehr zu Random Number Generation finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 14 Okt. 2013

Kommentiert:

am 14 Okt. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by