How can I create a matrix of N columns formed by just one vector?

Hi! If I have a vector like (5 8 7 9 8 4 7)' how can I create a matrix of N (for example 1000) columns formed by this vector? Thank you!

 採用された回答

Ahmet Cecen
Ahmet Cecen 2015 年 4 月 23 日
編集済み: Ahmet Cecen 2015 年 4 月 23 日

0 投票

for a row vector concatenated vertically:
A=repmat(vector,[1000 1]);
for a column vector concatenated horizontally:
A=repmat(vector,[1 1000]);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by