find minimum from cell array

2 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2021 年 10 月 20 日
編集済み: Elysi Cochin 2021 年 10 月 25 日
Find the minimum from the column named COL2 in the excel and get its corresponding value from COL1 for each M1, M2 and M3

採用された回答

KSSV
KSSV 2021 年 10 月 20 日
編集済み: KSSV 2021 年 10 月 20 日
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 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by