Gui becomes unresponsive when handles are too big

12 次查看(过去 30 天)
Hi there,
I'm developing a real-time Matlab GUI for neural signal acquisition and processing. The Matlab app reads a UDP buffer (via proprietary APIs) with the acquired signals and performs feature extraction in real-time. This is all good, the problem arises when over time, I keep storing the extracted features for off-line analysis and classification. I'm currently storing the features using data structures stored within the handles structure and eventually saving to files once the acquisition is completed. My big issue is that the Matlab GUI becomes unresponsive after a few minutes of acquisition, extraction and storage of the data. I think this is because the handles structure becomes too big (tens or hundreds of Megabytes) and at this point the GUI callbacks that should be able to access these handles might take too long to work. My Matlab program's "Main" is a Timer callback that polls new data from the buffer, then processes and stores them. This callback also makes use of the handles to store new data samples (new iterations get appended to existing cells) at each iteration of the loop. I think this might be my problem and I was wondering what the optimal solution would be in such a case. I was thinking that I might create a dedicated structure for dealing with the data (keep it separate from the handles structure) and use appdata or something like that to use it. Would this solve the problem? Keep in mind that my Timer callback would need to access these data structures in each iteration.
Thanks a lot

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by