reading a txt with periodic strings
조회 수: 2 (최근 30일)
이전 댓글 표시
Good afternoon,
I am trying to read a txt file that has
- 11 lines of header
- 8000 values
- 2 lines of string
- 8000 values
- 2 lines of string
- 2 lines of string
- 8000 values
- ....
I know how I can skip the header but not how to skip those 2 string lines every 8000 values.
Thank you a lot
Anna
댓글 수: 0
답변 (1개)
Shivam Prasad
2019년 11월 4일
Hi Anna,
I understand that the 8000 values contains the values as numeric types.
You can read all the values as strings from the text file, and ignore those values which are non-numeric. This can be checked by using the str2double function.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!