Using large .daq files
Show older comments
How do I figure out how many data points are in a large .daq file if the file is too large to open at once? My files range from 2 GB to 28 GB. I can only read a portion of them at a time by using:
daqread('Myfile.daq', 'Samples', [1 10000000]);
I want to loop through the large file in increments but I don't know when to terminate the loop. Without knowing how many data points there are my loop will inevitably attempt to access a point that does not exist.
Accepted Answer
More Answers (1)
Walter Roberson
on 4 Mar 2011
0 votes
When I look at the documentation, I do not see any easy way to calculate or display the number of samples available. I would have expected daqread('Myfile.daq','info') to return information such as that, but it does not appear to.
What happens when you attempt to read a sample that does not exist?
If need be, you could put the daqread() in a try/catch block -- though narrowing in on the actual number of samples might possibly be a nuisance.
Categories
Find more on File Operations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!