Subtract every element of array from one another and find the sum
12 次查看(过去 30 天)
显示 更早的评论
I want to subtract each element from one another and find the sum of each column for every element. Array is [47.07 49.39 56.87 69.04 72.80 72.68]
1 个评论
回答(1 个)
Walter Roberson
2019-11-1
A.' - A
4 个评论
Walter Roberson
2019-11-2
[~, maxidx] = max(YourMatrix(:,3)*YourMatrix(:,4));
ExtractedRow = YourMatrix(maxidx,:);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!