필터 지우기
필터 지우기

Using textscan for large .txt data files

조회 수: 2 (최근 30일)
Ana
Ana 2014년 3월 17일
답변: Sean de Wolski 2014년 3월 17일
I have a .txt file, separated by tabs, with about 150MB and 2 or 3 columns. Import data does not seem to work and I wanted to use the textscan function, since I believe will be the most effective. Is there any special (simple and fast) way to do this? I am new at matlab. Thank you in advance!

답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 3월 17일
I would use the Import Tool to generate a function that calls textscan.
  1. To do this, make a second text file with the first 15 or so representative rows of your current one.
  2. Right click on it from the current folder browser and select Import Data, or click on Import Data on the Home Tab.
  3. Make any selections you have to with regards to delimeters/formats/etc.
  4. Then underneath the green check for import data, select the drop down menu "Generate Function". # Save this file and then use it to import the original full size file.

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by