How to extend a row vector so the result is a table?

1 Ansicht (letzte 30 Tage)
I have 1 x 1200 row vector and need to extend each column down 1200 spots so that the result is a 1200 x 1200 table with the same values of x
So for example:
4 3 1 2
would become
4 3 1 2
''''''''
. . . .
. . . .
x 1200
4 3 1 2

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 9 Mai 2016
a=[4 3 1 2]
b=repmat(a,1200,1)

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by