Large Binary Data Files: Can I Animate while Simultaneously Loading the Next Data Block Into Memory from Disk?
이전 댓글 표시
Hi There,
I'm making tools for visualizing very large data sets. A typical routine will often look something like:
function AnimateFile(fidIn,BytesPerStep,NumSteps,StepsPerBlock,GraphicsHandles)
NumBlocks = ceil(NumSteps/StepsPerBlock);
for BlockNum = 1:NumBlocks
DataBlock = fread(fidIn,[BytesPerStep StepsPerBlock],'*uint8');
for StepNum = 1:size(DataBlock,2)
MakePrettyPictures(DataBlock(:,StepNum),GraphicsHandles)
end
end
But of course this means that the animation runs in fits and starts as it jumps back and forth between rendering in the inner loop and waiting for the fread() in the outer loop to complete. Is there some way of making the fread() command run "in the background" to load up the data for the next block while the current block is being animated?
-Jan
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!