Sort twice within the same dataset

조회 수: 2 (최근 30일)
BA
BA 2022년 7월 4일
댓글: BA 2022년 7월 4일
I'm working with a really large data set and I was hoping to write some code to sort within the same data set twice. This might sound confusing but specifically what I'm trying to do is sort one column, and while keeping the sort for that row, I want to sort another column.
If anyone is aware of a way to do this, please let me know.
Thanks

채택된 답변

dpb
dpb 2022년 7월 4일
Well, it's certainly not totally clear what you mean -- but if you mean sort by multiple columns, see sortrows, the optional second argument, column
  댓글 수: 12
Bruno Luong
Bruno Luong 2022년 7월 4일
편집: Bruno Luong 2022년 7월 4일
"If you can make something of it though, let me know"
No it's your data, no one can do "'something of it"
So you discover that your importation reverses date and month and has missing date in the data base. It has nothing with the original question you asked about sorting.
It seems you can accept dpb answer and move on, and ask another question if you are stuck by other issues.
BA
BA 2022년 7월 4일
Well he asked for the data. I was ready to move on after the third message because I realized there were issues with the data itself.

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by