MATLAB Answers

How do I concatenate the same table n-times vertically?

2 ビュー (過去 30 日間)
I want to make a bigger table by adding my table (T) n-times vertically. If n is a small number, let's say n=5, I can basically write it like so:
biggertable = [T;T;T;T;T]
But what if n=1000 or even more? Is there a matlab command that does this? Thanks a lot for your help!

採用された回答

Simon Chan
Simon Chan 2021 年 8 月 22 日
Try this:
biggertable=repmat(T,1000,1);
  1 件のコメント
Thi Hong Nhung Nguyen
Thi Hong Nhung Nguyen 2021 年 8 月 22 日
worked perfectly! Thanks a lot for your help!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by