find minimum from cell array

2 visualizaciones (últimos 30 días)
Elysi Cochin
Elysi Cochin el 20 de Oct. de 2021
Editada: Elysi Cochin el 25 de Oct. de 2021
Find the minimum from the column named COL2 in the excel and get its corresponding value from COL1 for each M1, M2 and M3

Respuesta aceptada

KSSV
KSSV el 20 de Oct. de 2021
Editada: KSSV el 20 de Oct. de 2021
T = readtable('my_excel.xlsx') ;
[val,idx] = min(T.(2)) ; % get minimum from col2
iwant = T.(1)(idx) ; % get the value
If you proceed with xlsread which is outdated:
[num, txt, raw] = xlsread('my_excel.xlsx') ;
[val,idx] = min(num(:,2));
iwant = num(idx,1)

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by