フィルターのクリア

find the rank of a element in a an array of numbers

8 ビュー (過去 30 日間)
R yan
R yan 2014 年 4 月 21 日
コメント済み: Azzi Abdelmalek 2014 年 4 月 21 日
Rank of 3 in [4 5 2 7 8] is two. Is there a matlab function for this? How to do it? thanks

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 21 日
v=[4 5 2 7 8]
idx=find(v==2)
  2 件のコメント
R yan
R yan 2014 年 4 月 21 日
編集済み: R yan 2014 年 4 月 21 日
thanks, but I want to know the position of the element on the sorted array
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 21 日
idx=find(sort(v)==2)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by