How to create a specific Matrix

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!

Antworten (2)

KSSV
KSSV am 5 Mär. 2020

0 Stimmen

c = [1 1 2 2 3 3]' ;
iwant = repmat(l',1,4) ;
Bhaskar R
Bhaskar R am 5 Mär. 2020

0 Stimmen

M = repelem([1:3]', 2, 4)

Kategorien

Tags

Gefragt:

am 5 Mär. 2020

Kommentiert:

am 5 Mär. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by