finding the mean/average of the smallest values in a row
2 次查看(过去 30 天)
显示 更早的评论
hi i have a row and i want to find the average of the smallest values (minimums) and the position of this element
0 个评论
采纳的回答
Bhuvnesh Singh
2018-2-28
To achieve this you can use function min and function mean
Lets say
A = [1.7 1.2 1.5; 1.3 1.6 1.99]
% use min function to get smallest element from each row.
M = min(A,[],2)
% use mean function
result = mean(M)
Follow the below links for more information:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Operators and Elementary Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!