필터 지우기
필터 지우기

Create vector from row's table in opposite order

조회 수: 1 (최근 30일)
matteo avanzi
matteo avanzi 2017년 11월 2일
댓글: matteo avanzi 2017년 11월 2일
I want to create a vector from a row's table in a way that the last value of the raw will be the first of the vector and viceversa for the first value. For example the 5th row of my table is [1 0.606617375231054 0.388555555555556 0.175210727969349], i need to create a vector in the opposite order like [0.175257731958763 0.390000000000000 0.603960396039604 1], because i need the values in a growing order not descendent.
thanks

채택된 답변

KL
KL 2017년 11월 2일
편집: KL 2017년 11월 2일
fliplr(yourtable{yourRow,:})
if you want to sort them instead of just flipping them like above, you should rather use,
sort(yourtable{yourRow,:})

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by