add array to end of itself n times

조회 수: 117 (최근 30일)
darksideofthemoon101
darksideofthemoon101 2011년 4월 5일
Hi,
I have an array x=(y1,y2) and I want to add copy the values in the array and add them to the end of the array, such as
x=[x,x];
Is there a way to do this for n times, where n would be the number of sets of the original x in the new value of x?
Thanks,
Richard

채택된 답변

Paulo Silva
Paulo Silva 2011년 4월 5일
doc repmat
example
n=2;
repmat([1 2],1,n)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by