What am I doing wrong with this function?

I have the following code:
data = textread('new_data.txt');
D = sortrows(data,[11 7], {'ascend' 'descend'});
I get the following error:
Error using sortrows
Too many input arguments.
Error in Cross_Correlation (line 76)
D = sortrows(data,[11 7], {'ascend' 'descend'});
What am I doing wrong?

 채택된 답변

Star Strider
Star Strider 2016년 6월 13일
편집: Star Strider 2016년 6월 13일

2 개 추천

Maybe this is what you intend:
D = sortrows(data, [11 -7]);

댓글 수: 3

Sandy
Sandy 2016년 6월 13일
Yes! Thank you!
Star Strider
Star Strider 2016년 6월 13일
My pleasure!
CHLA_SAIC
CHLA_SAIC 2017년 9월 6일
That worked nicely, thank you.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

질문:

2016년 6월 13일

댓글:

2017년 9월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by