Read line-by-line matrix NaN how to delete search?
1 view (last 30 days)
Show older comments
Hi, I have many text files.Read them, one by one, each line check whether NaN string destroyed in a need to re-create a new matrix.
files = dir('C:\myfolder\*.txt');
for k=1:2
fid=fopen(files(k).name);
tline = fgetl(fid);
while ischar(tline)
% disp(tline);
B=[];
B=[B tline];
tline = fgetl(fid);
end
fclose(fid);
end
1 Comment
Jan
on 30 Mar 2015
What exactly is your question? Where do the NaNs appear? How do the files look like? What is the wanted output?
Answers (0)
See Also
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!