I have t=[1 0 0;0 1 0; 0 0 1] size(t) is (3 3)
i need to make t with size of (x,3) where x is user input while element in t are repeated
eg if x=2 then t=[t;t]
if x=3 then t=[t;t;t]

 採用された回答

Titus Edelhofer
Titus Edelhofer 2015 年 9 月 1 日

0 投票

Hi,
use the function repmat:
repmat(t, x, 1)
Titus

1 件のコメント

Aditya Palsule
Aditya Palsule 2015 年 9 月 1 日
thanks a lot was a lot easier than I expected.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by