Finding several maximums using in a Excel file

1 view (last 30 days)
Hi.
I have a multiple spreadsheets from excel with n by m dimensions.
The first row is from a variable A and all the others are a variable B.
I want to find the maximum of each row (starting on row 2) and I need to know what is the corresponding value of the variable A for each maximum found, as well as the position (index) of the maximum.
Example:
[0 1 2 3 4 5
1 3 4 5 6 1
9 2 3 4 1 3
1 2 4 1 2 3]
Would give something like
[6, 4, 5
9, 0, 1
4, 2, 3]
For the first row of the results the results explained are: 6 is the maximum of row 2, 4 is the corresponding value in row 1 - which is the variable A, and 5 is the order number of the position of the maximum.
Can you help me with this please?
Cheers.
Jionaeos

Answers (0)

Community Treasure Hunt

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

Start Hunting!