Thank you everyone for your input! Here's an update:
After running my script and going into the actual files to confirm that it did what I want, I found that MATLAB has rounded off data points that were not used in the script.
For example, in the very first file, there is a data point that is originally 0.00100962, but after the script runs (even though this point isn't used in any calculations), the file says that the same value is now 0.0010096 (without the last two).
How can I stop MATLAB from doing this to values? It happens with almost every single data point, regardless of whether it is used in the script or not.