필터 지우기
필터 지우기

Concatenating matrix with itself x number of times

조회 수: 4 (최근 30일)
Aditya Palsule
Aditya Palsule 2015년 9월 1일
댓글: Aditya Palsule 2015년 9월 1일
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일
Hi,
use the function repmat:
repmat(t, x, 1)
Titus

추가 답변 (0개)

카테고리

Help CenterFile 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