read data from different rows
이전 댓글 표시
I would like to read from a text file. But i need to be able to skip a certain number of rows, read some data skip more rows and read some data and so on. thank you
댓글 수: 2
Mazen Arafeh
2011년 7월 25일
Walter Roberson
2011년 7월 25일
Please do not open duplicate Questions; it only leads to duplication of effort.
답변 (1개)
Fangjun Jiang
2011년 7월 25일
There are many ways. You can use textscan() to read line by line so you can skip any line you want.
If the file is not huge, you can read it once. Doing the skip in MATLAB matrix is much easier.
A easy try is to use the impordata() function.
a=importdata('MyDataFile.txt')
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!