Import data based on markers in Excel.
이전 댓글 표시
I am importing data from Excel file into Matlab using the xlsread command. My Excel sheet has data in columns B, C, D and E. The column A has the 'markers' at two locations telling me the start and end of rows that I need to import. For example, A7 has a marker "Start Load" and A155 has a marker "Stop Load". The marker locations are not always fixed. Is there a way for Matlab to detect the location of these marker strings in column A and import only those rows?
Thanks in advance,
Joe
답변 (1개)
dpb
2018년 6월 18일
0 개 추천
Read the text data from the spreadsheet in column A and locate the two fields, then reread with the specified range thus computed.
Or, read the whole sheet and return the raw cell data and do the above from the in-memory cell array. Will be somewhat faster as xlsread is fairly slow and so calling it twice will be more overhead-intensive.
카테고리
도움말 센터 및 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!