dlmread problem could not read file
    2 次查看(过去 30 天)
  
       显示 更早的评论
    
I have a text file with tab delimiter. I use
 B=dlmread('mon3.txt','',[2 0 20 1]);size (B)
With whatever combination of range, I cannot read the file. If I remove 
"Array  1  8192  #startdata" from the first line then I am able to read the file. Its strange. Pls help how to get rid of this problem. Using textscan and fread gives strange values. I want to attach the file mon3.txt itself, but dont know how to do it.
Secondly, I want to mention that I do read variety of files using dlmread and never has any problem.
tks
回答(1 个)
  Walter Roberson
      
      
 2012-12-19
        dlmread() can only be used for files that are completely numeric, including in the portions of the file that are to be skipped.
Please show a typical line, and please show your attempt to use textscan()
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!