Subtract every element of array from one another and find the sum

33 views (last 30 days)
Shweta Saboo
Shweta Saboo on 1 Nov 2019
Commented: Walter Roberson on 2 Nov 2019
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 Comment
ME
ME on 1 Nov 2019
I’m not 100% sure I follow. Could you possibly post your expected result from this?

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 1 Nov 2019
A.' - A
  4 Comments
Walter Roberson
Walter Roberson on 2 Nov 2019
[~, maxidx] = max(YourMatrix(:,3)*YourMatrix(:,4));
ExtractedRow = YourMatrix(maxidx,:);

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by