フィルターのクリア

Could anyone help me how to solve the following issue

1 回表示 (過去 30 日間)
jaah navi
jaah navi 2019 年 5 月 29 日
編集済み: Matt J 2019 年 5 月 29 日
i am having the matrixA= [3.1110 3.5665 3.5816 3.6923 4.2398 4.3484 4.3399 4.3447;
0.7787 0.5452 0.6372 0.5718 0.2473 0.2016 0.2089 0.2229;
0.1319 0.1788 0.2026 0.1927 0.1307 0.1767 0.1960 0.1825;
0.0859 0.0676 0.0646 0.1232 0.0858 0.1020 0.1103 0.1339]
in this matrix i want to select three maximum values from each column.
i tried with the command max(A) where it gives only one maximum value from each column.
Could anyone help me how to select more than one maximum value from each column.

回答 (2 件)

Matt J
Matt J 2019 年 5 月 29 日
  2 件のコメント
jaah navi
jaah navi 2019 年 5 月 29 日
i am using 2015a matlab version.
I think maxk cannot be performed on that version.
Matt J
Matt J 2019 年 5 月 29 日
編集済み: Matt J 2019 年 5 月 29 日

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


KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 5 月 29 日
a =
3.1110 3.5665 3.5816 3.6923 4.2398 4.3484 4.3399 4.3447
0.7787 0.5452 0.6372 0.5718 0.2473 0.2016 0.2089 0.2229
0.1319 0.1788 0.2026 0.1927 0.1307 0.1767 0.1960 0.1825
0.0859 0.0676 0.0646 0.1232 0.0858 0.1020 0.1103 0.1339
>> max(a')
ans =
4.3484 0.7787 0.2026 0.1339
  1 件のコメント
jaah navi
jaah navi 2019 年 5 月 29 日
i want to select two maximum values from each column
hence the result is
a=[3.1110 3.5665 3.5816 3.6923 4.2398 4.3484 4.3399 4.3447;
0.7787 0.5452 0.6372 0.5718 0.2473 0.2016 0.2089 0.2229]

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by