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

14 views (last 30 days)

Show older comments

##### 1 Comment

ME
on 1 Nov 2019

I’m not 100% sure I follow. Could you possibly post your expected result from this?

### Answers (1)

Walter Roberson
on 1 Nov 2019

A.' - A

##### 4 Comments

Walter Roberson
on 2 Nov 2019

[~, maxidx] = max(YourMatrix(:,3)*YourMatrix(:,4));

ExtractedRow = YourMatrix(maxidx,:);

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!