find minimum from cell array
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Elysi Cochin
am 20 Okt. 2021
Bearbeitet: Elysi Cochin
am 25 Okt. 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
0 Kommentare
Akzeptierte Antwort
KSSV
am 20 Okt. 2021
Bearbeitet: KSSV
am 20 Okt. 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)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!