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

 Respuesta aceptada

Wayne King
Wayne King el 14 de Oct. de 2013
Editada: Wayne King el 14 de Oct. de 2013
X = randi([0 1],20,20);
X(X==0) = -1;

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Oct. de 2013

Comentada:

el 14 de Oct. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by