How to create a specific Matrix

1 vue (au cours des 30 derniers jours)
Sara Trova
Sara Trova le 5 Mar 2020
Commenté : Sara Trova le 5 Mar 2020
Hi !
Can anyone help me in builting this specific matrix? I do not know if the "randi" function is the exact one.
Thank you in advance for your help!

Réponses (2)

KSSV
KSSV le 5 Mar 2020
c = [1 1 2 2 3 3]' ;
iwant = repmat(l',1,4) ;

Bhaskar R
Bhaskar R le 5 Mar 2020
M = repelem([1:3]', 2, 4)
  1 commentaire
Sara Trova
Sara Trova le 5 Mar 2020
Thank you very much!!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by