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!

답변 (2개)

KSSV
KSSV 2020년 3월 5일

0 개 추천

c = [1 1 2 2 3 3]' ;
iwant = repmat(l',1,4) ;
Bhaskar R
Bhaskar R 2020년 3월 5일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2020년 3월 5일

댓글:

2020년 3월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by