Searching through files for missing data
その他の回答 (1 件)
- Get a list of files. See dir()
- Read in the file. There are lots of ways to read files depending on the filetype and content (review).
- Are your time stamps in datetime format? If not convert them to datetime.
- If all you want to do is check whether a file is missing, you just need to store the following 3 data points for each file as 2 separate variables. This will be done in your loop: The first and last datetime value can be stored in an nx2 matrix for n files and the filename stored as an nx1 string array.
- Once all files are read and the 3 data points are stored for each file, you can sort the datetime values in case the files are read out of order and then compare the first datetime of file n with the last datetime from file n-1. If that difference is more than 5 minutes, you know you're missing a file and you can use the filename array to help identify which file is missing.