reading a text file
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everybody, I'm totally new user of MATLAB. I have a problem about reading a text file. I have a text file which has about 9000 rows. There are strings,numerical values, characters etc. I just want to take some necessary part from the text file. I realise that the necessary part starts the word "1tally". I need to take the 200 rows. There are 3 regions like this. In different location in the text file. But all of the regions starts 1tally and necessary part for me starts this row to the next 200 rows. How can I take these 600 rows from the text file which located on different place in the file??
댓글 수: 1
답변 (1개)
nanren888
2012년 1월 1일
Well, basically you are going to have to program it. Perhaps parse lines & select the lines you need. Maybe start with help textscan It may help if you know what the delimiter is in the file: eg, one space, commas. At the bottom of the help there are listed some other file IO functions that could be of use if textscan's all encompassing way does not suit you for some reason.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Export에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!