How to give input as a text and read the number corresponding to that text from the excel sheet
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everyone, I am trying to write a code which takes an input argument in the form of the text from the user and then matlab find that word in the excel sheet and return the number corresponding to it.The excel file will be as follow:
Material name Material temprature
steel 212
zinc 300
** I have only put two materials but iit will be around 200 matrials in the real excel file
So, If i put the steel and it should return 212 but I not able to get it.Any help will be appreciated.Thank you
댓글 수: 0
채택된 답변
Monika Jaskolka
2021년 5월 11일
편집: Monika Jaskolka
2021년 5월 11일
data = readtable('Spreadsheet.xlsx');
entry = data(strcmp(data.MaterialName, 'zinc'), :);
entry.MaterialTemperature
추가 답변 (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!