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!