It turns out that daqread() will accept sample ranges greater than what exists in the file being read. So my solution to processing my data is the following:
DataChunkSize=1e7;
ChunksProcessed=0;
while DataChunkSize==1e7
Data=daqread('Myfile.daq', 'Samples',...
[DataChunkSize*ChunksProcessed+1,...
DataChunkSize*(ChunksProcessed+1)]);
DataChunkSize=numel(Data);
%%%%My data processing
ChunksProcessed=ChunksProcessed+1;
end
This works fine except the last loop will cause a warning to be spit out in the command window. It is slightly frustrating that the warning message tells you how many "samples" are in the .daq file, but there seems to be no way to get this information from Matlab. Oh well. At least the code can run to completion. Thanks for your help Walter.
