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 ExchangeShifting 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