필터 지우기
필터 지우기

How can i add elements of the row at the end of the row?

조회 수: 3 (최근 30일)
Azime Beyza Ari
Azime Beyza Ari 2022년 3월 21일
편집: Voss 2022년 3월 21일
Hello everyone,
I m trying to expand my row vector and couldnt find any easy solution
Here is what i am trying to do:
I have a mtrix lets say this one
A = [1 2 3 4 ]
It should be like this;
A =[1 2 3 4 1 2 3 4 ]
I wanna add the same row back to back for 36 times. Any solution suggestions?

채택된 답변

Voss
Voss 2022년 3월 21일
편집: Voss 2022년 3월 21일
A = [1 2 3 4];
A = repmat(A,1,36)
A = 1×144
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by