creating a matrix by expanding a row

Suppose I have a 1*N row vector A. I want to vertically concatenate A for M times to create M*N matrix. Please advise.

 採用された回答

Ameer Hamza
Ameer Hamza 2018 年 4 月 21 日

1 投票

You can use repmat() to repeat a matrix several times. In your case you can use

repmat(A, m, 1)

その他の回答 (0 件)

カテゴリ

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

製品

タグ

質問済み:

2018 年 4 月 21 日

回答済み:

2018 年 4 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by