importdata skips the last few rows?
Show older comments
Hello all. I was using importdata in my code to bring in some matrices. I hadn't tested the code in quite some time, but I just upgraded from r2011a to r2012a and then ran it. Apparently importdata is now misbehaving. Whenever I try to do
>> data = importdata('file.txt')
where file.txt is a 360x720 ASCII file (generated from Matlab a while back using
>> save('file.txt','variable','-ASCII')
I get a variable that is 348x720:
>> size(data)
ans =
348 720
This happens with other 360x720 ASCII files as well, although for some of them I only get 347 rows. What do you think is going on? Thanks in advance!
3 Comments
Sean de Wolski
on 9 May 2012
Does it fail in both 11a and 12a? Are there any empty lines or invisible ASCII that could be causing it to choke?
Sam
on 9 May 2012
Sam
on 9 May 2012
Accepted Answer
More Answers (0)
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!