フィルターのクリア

Is there any way to code this on a different way?

1 回表示 (過去 30 日間)
flashpode
flashpode 2022 年 2 月 16 日
コメント済み: flashpode 2022 年 2 月 16 日
I want to get the max value of a variable and the number #100(max). I got this code:
[b,index] = maxk(lat1,100);
b_new = b([1,100])
Is there any way to write it to get directly the #1 and #100?
  2 件のコメント
Walter Roberson
Walter Roberson 2022 年 2 月 16 日
I wonder if you want max(lat1, 100)
flashpode
flashpode 2022 年 2 月 16 日
I want #1 and #100 and its indices

サインインしてコメントする。

採用された回答

Jan
Jan 2022 年 2 月 16 日
No. This is the efficient solution already. To get the 100.th most frequent element, you have to determine the frequencies of all other elements also.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by