[val,idx] = max(hasildk,[],2)
find row in specifics value
1 次查看(过去 30 天)
显示 更早的评论
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'
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Visual Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!