フィルターのクリア

How to select an maximum value from this matrix?

1 回表示 (過去 30 日間)
Matlab111
Matlab111 2014 年 11 月 3 日
コメント済み: Star Strider 2014 年 11 月 4 日
i have an matrix like this
a=[ 1.7923 179.1685 0.9985
38.6896 186.7030 1.0000
27.9668 191.8023 0.9988
15.1071 188.5679 0.9986
15.3087 173.0626 1.0000];
from this, i need to choose an higher value particularly in 3rd column according to that i want to choose the corespondent row value, like this
example:
b=[38.6896 186.7030 1.0000
15.3087 173.0626 1.0000]
like this i want to get output

採用された回答

Star Strider
Star Strider 2014 年 11 月 3 日
This works:
b = a(a(:,3)>=1-1E-8,:)
producing:
b =
38.6896e+000 186.7030e+000 1.0000e+000
15.3087e+000 173.0626e+000 1.0000e+000
The inequality test is to allow for floating-point approximation error.
  4 件のコメント
Matlab111
Matlab111 2014 年 11 月 4 日
K thank you.
Star Strider
Star Strider 2014 年 11 月 4 日
My pleasure!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by