Borrar filtros
Borrar filtros

How to create a specific Matrix

2 visualizaciones (últimos 30 días)
Sara Trova
Sara Trova el 5 de Mzo. de 2020
Comentada: Sara Trova el 5 de Mzo. de 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!

Respuestas (2)

KSSV
KSSV el 5 de Mzo. de 2020
c = [1 1 2 2 3 3]' ;
iwant = repmat(l',1,4) ;

Bhaskar R
Bhaskar R el 5 de Mzo. de 2020
M = repelem([1:3]', 2, 4)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by