How can I create a matrix of N columns by using 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!

回答 (1 件)

Theo
Theo 2015 年 4 月 23 日

1 投票

vec= [5 8 7 9 8 4 7]';
vec_repeat=repmat(vec,1,1000);

カテゴリ

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

製品

質問済み:

2015 年 4 月 23 日

回答済み:

2015 年 4 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by