make a matrix from

조회 수: 4 (최근 30일)
Lev Mihailov
Lev Mihailov 2019년 11월 7일
답변: JESUS DAVID ARIZA ROYETH 2019년 11월 7일
I am given numbers 2, 4 and 8, I need to make three matrices from them, format 3x3.1x10 (this will already be a vector) and 2x4
X=[2 2 2: 2 2 2: 2 2 2] Y=[4 4 4 4 4 4 4 4 4 4 ]
example example how it should look. Is it possible to do this automatically? Preferably without cycles

답변 (1개)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 11월 7일
x=repmat(2,3,3)
y=repmat(4,1,10)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by