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

 Réponse acceptée

Wayne King
Wayne King le 14 Oct 2013
Modifié(e) : Wayne King le 14 Oct 2013
X = randi([0 1],20,20);
X(X==0) = -1;

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by