make a matrix from

1 visualización (últimos 30 días)
Lev Mihailov
Lev Mihailov el 7 de Nov. de 2019
Respondida: JESUS DAVID ARIZA ROYETH el 7 de Nov. de 2019
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

Respuestas (1)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH el 7 de Nov. de 2019
x=repmat(2,3,3)
y=repmat(4,1,10)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by