find row in specifics value

1 回表示 (過去 30 日間)
Fabyola
Fabyola 2020 年 9 月 24 日
編集済み: KSSV 2020 年 9 月 24 日
if i want to find out my max_dk's variable result come out from what columns in variable 'hasildk' , what should i do next? thanks a lot for your help
hasildk = [0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.1053; 0.2745 0.1443 0.0284 0.0000 0.1602 0.0000 0.0000; 0.5770 0.0054 0.0354 0.0000 0.0025 0.0002 0.0002; 0.0016 0.0077 0.0000 0.0000 0.0001 0.0000 0.0000; 0.3827 0.0117 0.0163 0.0000 0.0114 0.0000 0.0000; 0.3010 0.0068 0.0800 0.0001 0.0327 0.0024 0.0000; 0.0000 0.0000 0.0391 1.0000 0.0001 0.0000 0.0000; 0.0001 0.0013 0.1348 0.3578 0.0020 0.0000 0.0000; 0.0009 0.0002 0.2526 0.2581 0.0003 0.0000 0.0000; 0.0555 0.0119 1.0000 0.0391 0.0294 0.0000 0.0000]
[i,j] = size(10:1);
max_dk = zeros(i,j);
for k = 1:10
max_dk(k) = max(hasildk(k,:));
end
hasilmax = max_dk'

採用された回答

KSSV
KSSV 2020 年 9 月 24 日
編集済み: KSSV 2020 年 9 月 24 日
[val,idx] = max(hasildk,[],2)

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by