How can I import a single row from text file?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a file which contains 1000 rows and 6908 column. It looks like this
3.490693e-02 3.604404e-02 3.532657e-02 8.249564e-05 8.572962e-05 8.369483e-05 3.631958e-05 3.830521e-05 3.705194e-05 1.016112e-04 1.060492e-04 1.032492e-04 4.740712e-05 4.949185e-05 4.817630e-05 1.0.....................
How Can i just import this line. At the later stage I need to plot the graphs. When I use importdata workspace, in value column, double/cell. Where should I get more information about this?
Thank you for the help
댓글 수: 1
dpb
2018년 8월 8일
Which row, specifically?
In general it's much simpler and probably faster to read the full file and do whatever selection is desired in memory.
채택된 답변
Donato Foggetti
2018년 8월 8일
편집: Donato Foggetti
2018년 8월 8일
In these cases, I usually import the data into an Excel spreadsheet (the procedure is 99% automatic), then I import everything in MATLAB from the *.xlsx file: you can choose which rows and columns have to be imported and the type of variable. You can also automatically generate a script or function so that this procedure will be done just the first time.
I hope to have been helpful.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!