How to find maximum element of particular column in a array
2 次查看(过去 30 天)
显示 更早的评论
A=[1,2,3,4,5,18;7,8,9,16,11,12;13,14,15,10,17,6]
Now I need maximum value of column 2,4 and 6
which is 14,16 and 18
采纳的回答
Walter Roberson
2022-9-7
max(A(:, [2 4 6]),[],1)
The ,1 forces it to take maximum along columns even if there is only one row
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!