find minimum from cell array
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!