How to sum the minor number of each line in a matrix?
1 次查看(过去 30 天)
显示 更早的评论
The question its in the title, thanks
0 个评论
回答(1 个)
Erivelton Gualter
2019-11-20
Given matrix A as:
A = [9 6 3;
8 5 2;
7 4 1]; % Sample Matrix
minA = min(A,[],2); % Returns min value for each line (row)
sumMinA = sum(minA); % Returns the sum of the min values
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NaNs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!