import some data from a text file

조회 수: 3 (최근 30일)
Baba
Baba 2011년 10월 31일
Hi, I have a text file with space separated numbers that I need to import into Matlab to do some processing on. Can not use the "load" command to import the whole file because it's way too big (5Gb). Text file looks like this:
1.2 4.2 5.2 5.33 6.45 7.64 3.45 7.34 ........
2.34 5.23 .235 .2343 2.34 3.4 3.42........
and so on with
What I'd like to do is be able to read in and Store first 10 values of each row into a column vector. Then the next 10 values of each row and o on...
to have something like:
X=[row1 (1 thru 10); row2 (1 thru 10);...]
or more generally,
y=[row1 (start position thru end position;.....]
Any help appreciated,
Thank you!
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 10월 31일
Original is at http://www.mathworks.com/matlabcentral/answers/19851-reading-data-into-matlab

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2011년 10월 31일
This is the same question you asked before, accepted my answer, and then apparently closed before having resolved your questions (or even indicating what your concerns were). As you did not even reference that previous question, I must presume that I was totally off track as to what you were trying to do, and thus that this question is best left to someone else to answer, with my original answer serving others mostly as a hint as to what not to answer.

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by