0

I am trying to open an ASCII file in MATLAB using textfile. It's a very large file with 13 rows of string headers and a 1399 by 1399 matrix of floating point numbers. Some value are blank but I cannot know which ones. The file has comma separated values.

fid = fopen (filename); 
Zs = textscan (fid, '%f' , 'Bufsize' ,1000000 , 'Delimiter' , ',' , 'EmptyValue',0); 
fclose (fid);

Zs is only a 1*1 matrix with the first number. I would really appreciate some indications which can help me.

giannis christofakis
  • 8,201
  • 4
  • 54
  • 65
  • 1
    add `'HeaderLines',13` in your parameters in `textscan`, otherwise textscan tries to read data according to the format `%f` but probably stumble onto the header and return immediately. – Hoki Sep 30 '14 at 09:32
  • Thanks for the answer. But i still have the same problem. It just gives me the number on row in text value – Dimitri_d Oct 01 '14 at 11:16
  • Can you upload your file, or at least an extract (a small sample of it), otherwise it will be near impossible to find what's wrong. – Hoki Oct 01 '14 at 15:54

0 Answers0