MATLAB: Why am i getting an extract error which states wrong number of bytes found
extract errorMATLAB
Best Answer
That error has several possible causes:
A network problem caused the download to end early, so the file came out the wrong size.
Security equipment or software caused the download to end early, so the file came out the wrong size.
The disk filled up
operating system glitch
The easiest thing to check is to be sure you have enough free disk space. If you do, then retry, and if the exact same number of bytes are downloaded (or close to it) then probably security systems are interfering. If you retry and the number of bytes varies a fair bit, then you might perhaps not have a reliable network connection.
Please attach 'csvfilelistohm.txt'. Apparently there is a string in there that is a filename but without an extension. This code is not robust at all. But what is worse is that the name variable will not change on each iteration - not that it has to since you could overwrite "name" but it should be different. If you don't need to store all the names (or the only one that you are reading actually), then just overwrite it:
for k = 1 : num_files % Don't use i as an iterator variable.
% Get a new filename from the file. (Won't happen though!)
thisFileName = fscanf(fileID,'%s\n',1);
% It's presumably a csv file, so check if it's actually there.
Best Answer