You have an empty lines in the input, and lines that have only blanks. fgets() is going to return each line including the line terminator. The strread() with '%s' format is going to return an empty cell array on those lines.
I would remind you that
for i = 6 : 414
line = fgets(fid01);
...
end
contains no instructions to MATLAB that the line to be fetched is the line number the corresponds to "i".
What you should do is, before the "for i = 6" loop, add a loop
for i = 1 : 5
line = fgets(fid01);
end
to read through (and ignore) lines 1 to 5. Then each time you read a line in "for i = 6 : 414" the line number will implicitly synchronize with the value of the "i" variable.