rearrangement of row matrix

조회 수: 3 (최근 30일)
Busy Bee
Busy Bee 2018년 1월 11일
댓글: Busy Bee 2018년 1월 11일
I have a row matrix and I need to rearrange the matrix such that it follows the same order but only the starting point is changed. I need the matrix to start from the twelfth element. how can I do that? original matrix;
1.0534
1.0684
1.3562
1.2202
1.0657
0.9767
0.9515
0.9108
0.8315
0.5857
0.4272
0.2127
0.4428
0.5233
0.8409
0.8941
0.9675
1.0534
new matrix;
0.2127
0.4428
0.5233
0.8409
0.8941
0.9675
1.0534
1.0534
1.0684
1.3562
1.2202
1.0657
0.9767
0.9515
0.9108
0.8315
0.5857
0.4272

채택된 답변

Jos (10584)
Jos (10584) 2018년 1월 11일
circshift is your friend. Example:
A = 1:10 % your vector
N = 5 ; % start at position N
B = circshift(A, 1-N)
  댓글 수: 1
Busy Bee
Busy Bee 2018년 1월 11일
and what if it is n*2 matrix?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by